meade95 0 Posted May 26, 2011 What is the simplest way to make an Opfor unit basically captured / surrender to BluFor once within a given distance from them. Via a trigger? Or via a script with a trigger attached to my unit (much like a confirmed HVT killed trigger can be attached to a unit). Share this post Link to post Share on other sites
demonized 16 Posted May 26, 2011 (edited) there is the ingame surrender module, but that relys on enemys being low morale or out numbered. edit, but a script run in a trigger with player present would be more appropriate perhaps for what you want. the trigger should be x size and synched to player unit, or use condition player in thisList the script should look something like this: nameOFHVT playMove "surrender_animation_you_need_to_find_it"; removeAllWeapons nameOFHVT; [nameOFHVT ] joinSilent group player; Edited May 26, 2011 by Demonized Share this post Link to post Share on other sites
icebreakr 2103 Posted May 26, 2011 Does the trigger OPFOR NOT PRESENT activate if surrendered unit via module is still inside the trigger area? Share this post Link to post Share on other sites
demonized 16 Posted May 26, 2011 yes, any setCaptive units does not trigger any triggers. A captive is neutral to everyone, and will not trigger "detected by" conditions for its original side. Share this post Link to post Share on other sites
meade95 0 Posted May 26, 2011 @Demonized - Thanks for the additional info - That is what I'm going to look to do later today - I'm going to create a trigger, with such a script inside then attach (group it) to my unit's leader (with an "any member of unit" applied). Just have to see if I can figure out the correct code to make HVT unit surrender. Share this post Link to post Share on other sites
meade95 0 Posted May 27, 2011 there is the ingame surrender module, but that relys on enemys being low morale or out numbered.edit, but a script run in a trigger with player present would be more appropriate perhaps for what you want. the trigger should be x size and synched to player unit, or use condition player in thisList the script should look something like this: nameOFHVT playMove "surrender_animation_you_need_to_find_it"; removeAllWeapons nameOFHVT; [nameOFHVT ] joinSilent group player; Huh, Can't get this to work. Share this post Link to post Share on other sites
2nd ranger 275 Posted May 27, 2011 (edited) You changed nameOFHVT to your unit's name and found an appropriate surrender animation, right? Also, if you do this: NameofGuy PlayACTION "Surrender" NameofGuy disableAI "ANIM"; The guy will put his hands on his head and stay like that. Then after a delay, you can remove his weapons (or get him to drop them), enable his anims and get him to join you. Here's the name of a surrender animation for putting his hand on his head if you want to go that route. amovpercmstpsnonwnondnon_amovpercmstpssurwnondnon Edited May 27, 2011 by 2nd Ranger Share this post Link to post Share on other sites
Bon 12 Posted May 27, 2011 Does the trigger OPFOR NOT PRESENT activate if surrendered unit via module is still inside the trigger area? setCaptive changes a unit's side to CIVILIAN. So I am pretty sure triggers like "OPFOR NOT PRESENT" will be affected when all OPFOR units inside the trigger area become captive. Accordingly, "CIVILIAN PRESENT" will trigger when captives enther the trigger area. Share this post Link to post Share on other sites
demonized 16 Posted May 27, 2011 setCaptive changes a unit's side to CIVILIAN. So I am pretty sure triggers like "OPFOR NOT PRESENT" will be affected when all OPFOR units inside the trigger area become captive.Accordingly, "CIVILIAN PRESENT" will trigger when captives enther the trigger area. that is correct and also a side note, haystacks or any other "object" triggers the civilian present trigger, wich is kindof silly. Objects should belong to a gl side and not a "alive" side. Share this post Link to post Share on other sites
meade95 0 Posted May 28, 2011 You changed nameOFHVT to your unit's name and found an appropriate surrender animation, right?Also, if you do this: NameofGuy PlayACTION "Surrender" NameofGuy disableAI "ANIM"; The guy will put his hands on his head and stay like that. Then after a delay, you can remove his weapons (or get him to drop them), enable his anims and get him to join you. Here's the name of a surrender animation for putting his hand on his head if you want to go that route. amovpercmstpsnonwnondnon_amovpercmstpssurwnondnon Ok. I tried this route. Put within my HVT Init: Hvt PlayAction "amovpercmstpsnonwnondnon_amovpercmstpssurwnondnon" ; Hvt disableAI "ANIM". But the surrender part doesn't happen. He basically just stands there AI-less. But can't join group or anything. I'm obviously missing something... Do I need to leave the word "surrender" in there? Share this post Link to post Share on other sites
demonized 16 Posted May 28, 2011 (edited) "amovpercmstpsnonwnondnon_amovpercmstpssurwnondnon " remove the last space like this: "amovpercmstpsnonwnondnon_amovpercmstpssurwnondnon" and i think if you disableai "ANIM" right after giving the playmove it will simply stop, better waitUntil animationstate is surrender type then disableAI "ANIM" or something. have you read Mr Murrays Editing guide deluxe? its perfect for new mission editors/scripters, it applies for a2 as well since same type commands and setup is used. That guide also has a surrender section if i recall correctly. Edited May 28, 2011 by Demonized Share this post Link to post Share on other sites
2nd ranger 275 Posted May 28, 2011 (edited) No no, the animation part was in case you wanted to go the animation route rather than use playaction. Sorry that wasn't too clear now that I read it. Do exactly this: NameofGuy PlayACTION "Surrender" NameofGuy disableAI "ANIM"; Put that in a trigger or script, not in his init line. And no, it won't stop. If you tell a guy to do an animation or action then disableai "Anim", he will go through it first and then simply freeze in the last position of the anim. This makes him stay with his hands on his head until you enable his AI again and allow him to follow you. A few seconds before or after he puts his hands on his head you can make him drop his weapon, then make him join your group. Edited May 28, 2011 by 2nd Ranger Share this post Link to post Share on other sites