What specific commands in a script can I use to detect a unit and store it in a variable for later use?
For example, there's a dead soldier on the ground and you have a script running which, when the dead soldier is detected infront of a player, will add an action to that player to call an ambulance. The player calls the ambulance, the ambulance moves to the dead guy, puts him in the ambulance, and it drives off (No use saving dead guys!).
Something like, "NameOfPerson = TheUnitNearPlayer". Then use scripts to detect if "TheUnitNearPLayer" is damaged. "?(Damage NameOfPerson >= 0.5): NameOfPerson addaction ["(Radio Ambulance)", "RadioAmbulance.sqs";exit"
I think this would be helpful if the unit doesn't have a name either. In another example, you'd have a script running which would tell any East soldier (during a scenario) to surrender if he is damaged too much and give up. It would detect any SOLDIER, which wouldn't apply to a tank crew or such.
Are there specific class names that you could apply? Maybe detecting if there is a tank infront of you instead of a man.
---RunAwayScientist