Page 1 of 1

Whats wrong with this? (Variables)

PostPosted: Fri Nov 03, 2006 10:14 am
by sonicfire
I have an actor. In this i´ve defined a
Code: Select all
int enable_grav;
enable_grav = 1;

in the "Create Actor" event.

Then i have the "Draw Actor" event in which i use this variable:

Code: Select all
if (enable_grav)
{
   // do something
}


However this wont work! May i ask why?
How can i access variables that i´ve defined within actors?

PostPosted: Fri Nov 03, 2006 1:07 pm
by makslane
To create global vars, you must put the declaration in the 'Global Code' editor, or use the 'Variables' button to create it.

PostPosted: Fri Nov 03, 2006 2:41 pm
by sonicfire
Thank you very much! :)