OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: paper plane on 06 Jun 2004, 18:33:58

Title: need help with Surrender script
Post 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 )
Title: Re:need help with Surrender script
Post by: Loup-Garou on 06 Jun 2004, 18:55:24
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  ;).
Title: Re:need help with Surrender script
Post by: paper plane on 07 Jun 2004, 07:10:23
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 !! ??? ???)