Waffle_SS 11 Posted March 9, 2013 I need help passing a variable from a script to a trigger that has been placed in the editor. Lets say I have a variable "dsarf=true" in a script. When I try to have a trigger activated by the condition "true=dsarf" the variable never gets through. I've even tried "dsarf=true;publicVariable "dsarf"; in the script, but it still never gets through. Does anyone know how to pass a variable between a script and a trigger? Both ways? Share this post Link to post Share on other sites
dwringer 45 Posted March 9, 2013 First, in your player's init line, your init.sqf, or any other init field you want really, put something like "dsarf = false;" just to initialize it. Make the condition in your trigger be simply "dsarf" (the 'true' is implicit by what is returned from the variable). Then the line "dsarf = true;" should be all that's necessary to fire it. EDIT: to be more precise, "true=dsarf" is wrong, that's an assignment to "true" of the value "dsarf", which fails because true is a universal value. To be more accurate you could do "true == dsarf" or "dsarf == true" but this is redundant. Share this post Link to post Share on other sites