Jump to content
Sign in to follow this  
-lordsoth-

Need help with hostage scripts

Recommended Posts

Hi,

I am very, very new to the mission editor and need help with my hostage rescue. I have 4 hostages, all un-equiped soldiers (no gear). I have got to the point where I can approach them and rescue them and have them join my team (plan to then gear them up and move on to next objective). What I am having trouble with is keeping them still and not targeted by the AI. Because they are soldiers they act that way and are then fair game for the enemy ai. I want it so that they are given a lower or no priority as a target when the shit hits the fan. So basically have the AI ignore them until I put them in my team and then it is game on again. Hope this makes sense.

Share this post


Link to post
Share on other sites

put that in the init field of each hostage:

this setCaptive true;

The AI will then ignore the captive units

when you execute joinSilent or whatever you use, just revert the commant back with:

this setCaptive false;

AI will now stop to ignore them.

Share this post


Link to post
Share on other sites

thankyou so much for the help, as stated I am a very noob with editing so when I rescue my men my script runs {[_x] joinSilent _ldr} forEach _grp; to join them to my group. How do I on its execution revert the init field to "setCaptive False"???

Share this post


Link to post
Share on other sites

{[_x] joinSilent _ldr; _x setCaptive false} forEach _grp;

Above will set them to setCaptive False when they join your group.

Share this post


Link to post
Share on other sites

thanks guys, very much appreciated. Really feel out of my depth when trying to make missions :(

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  

×