Jump to content
Sign in to follow this  
Phonix644

Run Script via Trigger - Need Help

Recommended Posts

Hey Guys,

I am very basically trying to run a script via a trigger, but have been unable to find out how to do so. I have looked through Google and the forums and have turned up empty.

My Condition is: !alive RGeneral and !alive MGeneral

I have tried using this, but I have come to realise this only works in the initialization of units: this exec "countdown.sqs"

So my question is does anyone have a code so that I can call this script from the trigger? I cannot do this with a unit because I need this to occur at the end of my mission after the condition has been met.

Thanks

Share this post


Link to post
Share on other sites

Well it sounds rather simple. The condition needs to be modified to this format:

not (alive truck1) AND not (alive truck2) AND not (alive truck3)

or

?!(alive truck1) && ?!(alive truck2) && ?!(alive truck3)

assuming you want them dead

otherwise use this:

?(alive truck1) && ?(alive truck2) && ?(alive truck3)

!=not

&&=and

If you only want the condition to be met to activate the trigger you need no size (x=0, y=0) and no activation.

Then in the activation field use this: [] exec "countdown.sqs";

I think that should do it.

btw

There are three groups of exec syntax that I know of, depending on how and where you use the script.

[] exec "Script.sqs";

this exec "Script.sqs";

[this] exec "Script.sqs";

Edited by Zulu1

Share this post


Link to post
Share on other sites

Thanks mate for the information,

the script: ?!(alive truck1) && ?!(alive truck2) && ?!(alive truck3)

comes up with an error, but: not (alive truck1) AND not (alive truck2) AND not (alive truck3)

Works perfectly.

Thanks for explaining the types of exec syntax that's pretty helpful.

It's weird for executing scripts with "[] exec "Script.sqs";" it doesn't work with !alive RGeneral and !alive MGeneral, but for everything else it does such as scripts like Play Sound "escape" or others.

Anyway thank you very much, solved the issue for me.

Share this post


Link to post
Share on other sites

Removed post --- posted in wrong thread by mistake --

Edited by deadlyfishes

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  

×