lucilk 10 Posted January 26, 2010 (edited) ok i got another one, i want to add a action to the player inside a trigger so: //this "i" i will need it later i=1; //now the trigger _brig = createTrigger ["EmptyDetector", getpos _civvehicle]; _btrig setTriggerArea [100, 100, 0, false]; _btrig setTriggerActivation ["WEST", "present", false]; //now the part with the problem[b][php]_btrig setTriggerStatements ["this", "pac1 = player addAction [""Stop Vehicle """"format [""""%1"""",i]"""" for inspection"", ""civc\stop.sqf"",[], 0, true, true, """", """"]; i=i+1", ""];[/php][/b]the ideea was that Stop Vehicle for inspection should be:Stop Vehicle [b][color=Red]1[/color][/b] for inspectionStop vehicle [b][color=red]2[/color][/b] for inspectionStop Vehicle [b][color=red]3[/color][/b] for inspection.....etcany ideeasThanks Edited January 26, 2010 by lucilk Share this post Link to post Share on other sites
shuko 59 Posted January 26, 2010 And this 1,2,3... is absolutely necessary? Share this post Link to post Share on other sites
lucilk 10 Posted January 26, 2010 its not that is necessary, is that i know it can be done and i might need it later, this is how i learned to do everything, just trying to do stuff and eventualy remember something form another script and use it for my needs, i was just curios how its made, beacuse i learn a script command every day and now i bumped in to "format" command and i dont know how to use it Share this post Link to post Share on other sites
beita 10 Posted January 26, 2010 Try: _str = format["Stop Vehicle %1 for inspection", i]; _btrig setTriggerStatements ["this", "pac1 = player addAction [_str, ""civc\stop.sqf"",[], 0, true, true, """", """"]; i=i+1", ""]; Easier to manage it via another variable than trying to put in 8 sets of quotes. Share this post Link to post Share on other sites
xPaveway 10 Posted January 27, 2010 Use single quote marks inside of the double quotes. It's kinda ridiculous having four double quotation marks in a row, it will be impossible to debug a beast such as that. Share this post Link to post Share on other sites
Murklor 10 Posted January 27, 2010 Yeah, for example in the post from beita above it would be: "pac1 = player addAction [_str, 'civc\stop.sqf',[], 0, true, true, '', '']; i=i+1" '' inside " is two ' Share this post Link to post Share on other sites