OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: paper plane on 06 Jun 2004, 18:33:58
-
How can I make an unarm unit see an enemy have weapon then he surrender, or some one shoot at him then he surrender? (I want to make it in script )
-
For the moment when enemy fires before unit surrender I suppose you'll to do something with the doFire command. Search in the forums. Then, for the unit's surrender, you have to put in the prisoner's init field : this setCaptive true (or in a script : prisonername setCaptive true) in order to avoid that the enemy shoots him (the prisoner). You also have several animations : FXStandSurUniv, or FXStandSurDown, or FXStandSur.
Hope it helps you ;).
-
thanks . I have download the "randomly surrender" script from the Editors Depot and use in my mission. but I have found a bug: when the enemy soldier close to the unarm unit, he don't surrender and only run away or lie in the ground. (I found another bug: when some enemys close to the dead body, it will stand up and under surrender !! ??? ???)