Jump to content
Sign in to follow this  
tmp95

Make opfor turn into captive / surrender ?

Recommended Posts

I would like to know what do i write into trigger that will have an opfor unit surrender once my unit is within a certain distance from him. Surrender and join my unit. 

 

Thanks all help

Share this post


Link to post
Share on other sites

No code example for now, but you would probably use a combination of:

  1. distance or distance2D to check the distance between your unit and the OPFOR unit
  2. setCaptive to make them surrender
  3. Possibly doMove to make the OPFOR unit move closer to your unit
  4. join to make the unit join your group

You could substitute (1) by placing a trigger on the OPFOR unit which activates once you get close enough though. The trigger would be set to the size you need.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×