jeppelykke 0 Posted May 31, 2003 Hey Hey (: I trying to work with thise so called: variables my question why dont this work: I have a trigger to activate on my person, it do work as i also set it to play music to hear it activate, now in my triggers activation field i enter: jlhstatus=1 and i have following script runing: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #start ? (jlhstatus==1) : goto "West" goto "end" #West titleText ["It works Damm \n Am Good", "PLAIN"] goto "end" #end goto "start" For some strange reason this is not working, any know how i can get a trigger to set "global" var i think its called, from what i search in forums but not found any exsamples that use this! Share this post Link to post Share on other sites
Chris Death 0 Posted June 1, 2003 Looks ok, but remember you have to initialize the variable jlhstatus as numeric variable by an init.sqs or let's say by a trigger right from the start. jlhstatus = 0 btw - you should add a small delay in your script to avoid a game hanger <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#start ~0.1 ? (jlhstatus==1) : goto "West" goto "end" #West titleText ["It works Damm \n Am Good", "PLAIN"] goto "end" #end goto "start" ~S~ CD Share this post Link to post Share on other sites
jeppelykke 0 Posted June 1, 2003 ok diden know about this init.sqs thingy but thanx mate! Well better add a delay then Thanx Best Regards Jeppe Lykke, Denmark Share this post Link to post Share on other sites
jeppelykke 0 Posted June 1, 2003 Hey Hey all, How do one delete a var again so i can use the same name exsample of my script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #tank3 deleteVehicle tank3 tank3 = nil ~5 tank3 = "M1Abrams" createVehicle getmarkerpos "tank3" Reason i have tank3 = nil is that in the "comref" it says that would: Description: Nil value. This value can be used to undefine existing variable. Example: variableToDestroy = nil But when i try to create the same tank it says that the name/var is still in use, anyone have and idea how i can fix that. AND Yes that tank has to be same name! ;) Share this post Link to post Share on other sites
Doolittle 0 Posted June 1, 2003 Chris, what is a "game hanger"?? Doolittle Share this post Link to post Share on other sites
Chris Death 0 Posted June 2, 2003 Quote[/b] ]Chris, what is a "game hanger"?? lol Doolittle you're right, this Austrian phrase doesn't make really sense in English What i tried to say was that the game could freeze by that kind of nonstop script without a delay. ~S~ CD Share this post Link to post Share on other sites