Forum Jump :

Author Message


Posts: 17
Rank:


Level: Member

Country: us
Location: US of A
Occupation:
Age: 27
In-game name: Kasuka

 
#1 Posted at 2011-02-28 18:21        
     
Hi. I'm curious if any one knows a way to detect when mines placed by the player or a unit have been detonated by a vehicle. I'm creating a mission where the player and his leading unit have to place six mines down for tanks to run over. I'd like to know how to (if there's a way) to detect when those mines have gone off and if their any any tanks still standing so the player can finish them off. If there's not any tanks left functional then the player can just move on.

I'd appreciate any help. Thanks.


Author Message

Nightrain  

I blow you away


Posts: 960
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 25
In-game name:

 
#2 Posted at 2011-02-28 21:52        
     
Better you read Wolle's solution at the bottom of the page. Once again he has a perfect answer :-)

I don't thinik you can check if the mine has gone off but you could do this.
Assuming the tanks are Opfor follow these steps:
1. Place a tirgger over the area you are supposed to have the tanks run over the mines (adjust it so it is big enough)
2. Set the presence to Opfor>Not Present.
3. Give an effect or a hint like this in the OnAct of the trigger: hint "Tanks destroyed";
That way if all the tanks are destroyed, you will receive a hint. The only problem with this solution is you can't account for crews that have bailed out. I'll have to think about some more.

This post was edited by Nightrain (2011-03-01 12:33, ago)

Armstrong-"Hey Carillo, do you see that?"
Carillo-"See what?"
Armstrong-"Something's burning over there, see the smoke?"
Carillo-"That's not smoke it's dust!"
Armstrong-"Dust? i don't get it."

Advertisement


Author Message


Posts: 312
Rank:


Level: Member

Country: us
Location: Casper, Wyoming
Occupation: Digital Artist / Graphic Designer
Age: 27
In-game name: C. Cunico / WyteOut

 
#3 Posted at 2011-03-01 01:35        
     
# Nightrain : 3. Give an effect or a hint like this in the OnAct of the trigger: hint "Tanks destroyed";
That is what I was going to say...Just create a hint for when the mines go off, best advice I can give.

My Youtube for noobie scripters: http://www.youtube.com/user/WyteOutAgain

Author Message

W0lle  

call me evil


Posts: 1944
Rank:


Country: de
Location:
Occupation: CWR² Project Lead
Age: 101
In-game name:

 
#4 Posted at 2011-03-01 05:50        
     
I don't think there is a way to check if a mine gone up or not. At least I can't think of a command to check that.

# Nightrain : I don't thinik you can check if the mine has gone off but you could do this.
Assuming the tanks are Opfor follow these steps:
1. Place a tirgger over the area you are supposed to have the tanks run over the mines (adjust it so it is big enough)
2. Set the presence to Opfor>Not Present.
3. Give an effect or a hint like this in the OnAct of the trigger: hint "Tanks destroyed";
That way if all the tanks are destroyed, you will receive a hint. The only problem with this solution is you can't account for crews that have bailed out. I'll have to think about some more.
Works but not that good, because tanks could have missed the mines and left the area unharmed. In that case the hint "tanks destroyed" is just a false assumption.

A better solution for the problem would be to check if the tanks still can move. For that do the following:
Give each of the tanks a name, here we use etank1 - etank4
Then use a trigger to check if they still can move:
Size: 0
Activation: None
Condition: !canMove etank1 AND !canMove etank2 AND !canMove etank3 AND !canMove etank4
OnActivation: hint "Tanks disabled"

However, if only one of the tanks passed the minefield the trigger gets not activated. If you want to get the hint when one of the tanks is disabled, replace AND with OR.