Jump to content
Sign in to follow this  
TravisJ

How do you call a trigger from another trigger?

Recommended Posts

How do you call a trigger from another trigger? I want to call trigger B from trigger A to create a chain reaction. How to do that?

Share this post


Link to post
Share on other sites

Well how about this:

in your init.sqs for the mission (just make one) put </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">go = false;<span id='postcolor'>

alternatively put that line in your Players init field.

Then in trigger A activation field put: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">go = true<span id='postcolor'>

After that, in trigger B and up you can use this in the condition field: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">this && go<span id='postcolor'>

This will ensure trigger B will not activate until 'go' is true, you can still select the type of activation for trigger B in the editor, but it will only come on after trigger A has activated.

Share this post


Link to post
Share on other sites

He may not want trigger B to have any conditions so in that case its condition field would be:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">go <span id='postcolor'>

RED

Share this post


Link to post
Share on other sites

Or if he wants trigger B to activate a time later he would want:

go && this

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (InqWiper @ Aug. 06 2002,07:53)</td></tr><tr><td id="QUOTE">Or if he wants trigger B to activate a time later he would want:

go && this<span id='postcolor'>

RED > yep, thanks

InqWiper, unfortunately the end result of

go && this

is the same as

this && go

Although if I was really worried about CPU usage I might opt for

go && this

just in case.

smile.gif

I am hoping that when he says how the 'go' works he can fix the datails as he likes.

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  

×