Jump to content
Sign in to follow this  
CarlGustaffa

executing scripts from within setTriggerStatements

Recommended Posts

Hi

How can I use setTriggerStatements where a script is entered in its "on activation" field? I can do one-line stuff, but once I need to use "scriptname.sqf" or something within "", I get into trouble. I've tried using {nil = [] execVM "scriptname.sqf"} (or something similar), but I end up with an error message.

How do I make doublequotes within doublequotes? " "test" "

Share this post


Link to post
Share on other sites

Yes, within double quotes. e.g:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_trigger setTriggerStatements ["this", "_myaction = player AddAction [""> Hello"",""hello.sqf""]", "player removeAction myaction"]

Wherever you would normally have " " you must have "" "".

Share this post


Link to post
Share on other sites

Ok, thanks, I'll keep it in mind. I'm sure I tried double qoutes, but if the example actually works, I probably made a mistake somewhere else.

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  

×