Jump to content
Sign in to follow this  
t-bone

variable = [] execVM "SQF file" in addAction command

Recommended Posts

I have a slight problem with the following code

laptop2 addAction ["Hack Terminal 2", "Triggers\obj2.sqf", nil, 6, True, True, "", "(_target distance _this) < 4"];

How can I define the SQF script here so that I can actually use "terminate" command on that SQF script?

I need it to interrupt hacking process itself, which is the obj2.sqf (so basically cancel / abort this script while it's executing)

Share this post


Link to post
Share on other sites

quick and dirty way...

you could use a waituntil command in the script - inside...

waituntil{!bombActive || bombActive};

if (bombActive) then { terminate _Script; };

addaction given a global variable that changes value - in turn waituntil is met.

hopefully you get the picture.

Share this post


Link to post
Share on other sites
quick and dirty way...

you could use a waituntil command in the script - inside...

waituntil{!bombActive || bombActive};

if (bombActive) then { terminate _Script; };

addaction given a global variable that changes value - in turn waituntil is met.

hopefully you get the picture.

I am sorry I don't catch it, shall I put both lines in the very start of the script?

What will it do, will it exit the script when bombActive = true?

I have a trigger marked the hacking area around laptop, once someone started to hack the laptop, but let's say on 50% decides to leave from this hacking area, hacking should be aborted (basically the script)

Edited by T-Bone

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  

×