Jump to content
Sign in to follow this  
alky_lee

setcaptive Trigger working intermittently

Recommended Posts

I am using setcaptive triggers to allow a player to go unchallenged as a civilian behind enemy lines which is then cancelled as he plants explosives. The setcaptive true is in a trigger at the mission start as he gets into a car and setcaptive false is in another trigger at the explosives target. I am finding that sometimes the triggers work and sometimes they don't. As this is a mission breaker I want to make sure they work every time. Is there anything that could interfere with the trigger working or is there a better way of doing it without triggers?

Share this post


Link to post
Share on other sites

This might help you;

A unit which is on "setcaptive true" is not recognized as a member of it's faction anymore.

Example:

1 BLUFOR unit is set to setcaptive true.

Now, there's a trigger, condition: BLUFOR is present

The unit enters the trigger area and... nothing.

Share this post


Link to post
Share on other sites

I understand that when set to true the unit assumes the class of a civilian. I had the trigger to make setcaptive false triggered by Civilian present once. Today the true trigger didn't work, then it did but the false trigger didn't work. I have changed the false trigger so that it is triggered by anybody and a condition of p1 in thislist. All was then working fine and I managed a full run through of the mission. The trouble is that tomorrow, the conditions may fail to work again. I am wondering if it is just a quirk of the editor, when it is first started up or whether this behaviour will continue after the game is published on Steam.

Share this post


Link to post
Share on other sites

How do you have the trigger set up, repeating?

Also animals and some objects will set off a trigger and will also prevent a trigger from re activating if they remain in the area.

I just re -read your post and using in thislist should get around that problem.

Are you in and out of a vehicle?

vehicle p1 in thislist

will work for both.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

The first trigger is at mission start as the player gets into a vehicle. The false trigger is a few minutes into the mission. After that they are no longer needed so they are set to trigger once. I hadn't considered animals setting them off, although I haven't seen any around that may have set them off. I wouldn't want to trigger the condition again later and inadvertently setcaptive true without realising it.

Share this post


Link to post
Share on other sites

You could also run a monitor to keep track of the player side

just place in p1 init and it will return your current side

null = [] spawn {while {true} do    { sleep 0.5;player sidechat str side vehicle p1}}

Share this post


Link to post
Share on other sites

I will try including that on the next run through, it might save a bit of time, although I soon know whether it's worked or not when I get engaged by the mounted machine guns at the checkpoints.

Share this post


Link to post
Share on other sites

Triggers worked fine today and the monitor was useful to check things were happening at the right time. Thanks.

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  

×