Jump to content
Sign in to follow this  
_qor

exec script doesnt call it correctly

Recommended Posts

I want to exec a script via radio trigger.

So I set it up in the editor and put "player1 exec "HQ.sqf" in the trigger's OnAct field.

But when I use the preset radio-trigger, the script doesnt come up rightly!

With the script I want a text and a new task to show up! But only after about 7 seconds, so this is my script:

sleep 7; 

hint "Journal Update! New Task retrieved!"; 

tskProceedToChernogorsk = player createSimpleTask["ProceedToChernogorsk"]; 

tskProceedToChernogorsk setSimpleTaskDescription["We made out that you are the nearest troup around the city! Proceed to Chernogorsk and protect the inhabitants from the intruding russians! We will provide you with further information later on...", "ProceedToChernogorsk", ""];

But the script doesnt wait 7 seconds but shows up instantly!

I also tried to put some text before the sleep command (perhaps it doesnt work at the beginning of the script), but this text is vanished in-game!

It also doesnt work when I set the trigger's countdown to 7, the hint "Journal Update! New Task retrieved!" shows up immediately!

So what is wrong with the script?

Thanks for help =)

Edited by _qoR

Share this post


Link to post
Share on other sites

exec is for .sqs syntax. Use execVM for .sqf

Share this post


Link to post
Share on other sites

Ah, I had to put "script = [] execVM "HQ.sqf" into the OnAct field ;)

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  

×