Jump to content
Sign in to follow this  
PicVert

Questions about global variables

Recommended Posts

Lilte question about global variables..

If I make a g.var. like that in script lauched by init eventhandler (sample) :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

COLORT = false

#loop

? COLORT : goto "next"

goto "loop"

Can I activate the g.var by a trigger in mission editor ?

second question does the global variable take lots of memory ? and if the script is ended like "EXIT" the g.var are staying in memory or not ?

thx for help a crazy_o.gif noob smile_o.gif

Share this post


Link to post
Share on other sites
Lilte question about global variables..

If I make a g.var. like that in script lauched by init eventhandler (sample) :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

COLORT = false

#loop

? COLORT : goto "next"

goto "loop"

Can I activate the g.var by a trigger in mission editor ?

second question does the global variable take lots of memory  ? and if the script is ended like "EXIT" the g.var are staying in memory or not ?

thx for help a  crazy_o.gif  noob smile_o.gif

1). I didn't tried it, but it should work, I think

2). "Variable may be unitialized by assigning it nil value. This effectively destroys variable as if it never existed." - from Command Reference

Share this post


Link to post
Share on other sites

To answer your first question, yes it works just put

COLORT = true in the init.sqs or in any trigger you want. And it doesnt take more memory than a normal variable ...

Thanks!

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  

×