Jump to content
Sign in to follow this  
yskonyn

How to: Delete a trigger or making it inactive?

Recommended Posts

Hi guys,

I've probably got a problem which many of you have encountered so I guess any of you will also know the answer to it smile.gif

For example:

I create a trigger around a civilian. The trigger checks if there's a unit of West-side present and if so, becomes active. The trigger will command a certain script to start which will handle the cutscene and the conversation.

However, if the cutscene is finished, the trigger is of no use anymore and should be deleted because we don't want the cutscene to play again if we accidentally walk in close by the civilian and thus activating the trigger!

So how do you make triggers inoperable or even delete em?

Thanks guys.

Share this post


Link to post
Share on other sites

hehe,, triggers are pretty smart, you know smile.gif

In the trigger setup screen, you'll see that it sayes that it can be triggered "ONCE" or "REPEATEDLY". If you have it set to "ONCE" (default), it will only be triggered once, and never again. If you have it set to "repeatedly", it will get triggered every time the condition is meet.

Share this post


Link to post
Share on other sites

Well in the conditoin feild put ( it should allready have "this" in it) :

this and cuts==1

so it will be active unit cuts==0

so at the end of your camera script put, cuts=0 (note only 1 equals mark) and it should make the trigger inactive.

Hope this helped.

RED

Share this post


Link to post
Share on other sites

Yes I have used the ONCE option in the trigger properties before, but it did not seem to work at that time, so I never bothered to use it anymore and tried to work it out with scripting itself.

I see it does work (have put it in my mission now), but I have one question though:

Will a trigger with ONCE in it's properties remain 'on guard' until he has been triggered?

Cause with my findings sometimes the effect of ONCE is that the trigger will check the conditions defined for it ONCE at the start of the mission, but then becomes useless, therefore not giving the effect it should...?

Thanks!

Share this post


Link to post
Share on other sites

The sensor/trigger waits until the condition/s is/are meet, and then they're triggered.

If you have a variable in the trigger's condition field, in something like the example above;

myCondition

(this means myCondition == true)

and you've set the variable as true, the trigger will get triggered smile.gif And you should alwayes give these kind of variables a start value, so that OFP doesn't assume the variable to have a value.

The triggers are accurate, it's just that you have to be sure that you've set everything up right wink.gif

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  

×