Jump to content
Sign in to follow this  
chappy

using format in a command other than text/chat/hint

Recommended Posts

Ok,

So i've used the format command in the past quite a lot to throw out a variable as a string and show it in sidechat or in a hint. no worries.

I'm now trying to figure out how you go about using it to fill in part of the name of an object.

i have a line in my script that i want to run

trigger_c4 setVariable ["spawn",true,true];

the bit that i want to use format for is the 4, where that value can be whatever happens to be held in variable called area_charlie

my best guess was something like.

call compile format  ["area_c%1 setvariable ["spawn",true,true]",area_charlie];

but no luck so far :(

Share this post


Link to post
Share on other sites

""spawn""

Start your game with -showscripterrors

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  

×