C
CosmicDrifter
Guest
Please tell me I'm wrong about this...
Just for the sake of this question, let's say I create an object called, TimerOne; create an instance layer for it, and then place it in room0. To even take it one step further, I declare a variable:
Now in the create event of TimerOne, I declare a variable:
Now, with that said, somewhere else in my game, I want modify the value of that variable. Now I would think that all I need to do is:
and that would be it. However, that is not the case as far as I can tell. When I try to modify a user-defined variable in an object I created, the value doesn't change. Am I missing something here or is this the way it is? I just assumed objects in GS2 were similar to Classes in C# and C++… where you can set its properties to be read and written to.
Thanks for taking the time to read this.
Just for the sake of this question, let's say I create an object called, TimerOne; create an instance layer for it, and then place it in room0. To even take it one step further, I declare a variable:
TimerOne = obj_TimerOne;
Now in the create event of TimerOne, I declare a variable:
tspeed = 0;
Now, with that said, somewhere else in my game, I want modify the value of that variable. Now I would think that all I need to do is:
TimerOne.tspeed = 0.32;
and that would be it. However, that is not the case as far as I can tell. When I try to modify a user-defined variable in an object I created, the value doesn't change. Am I missing something here or is this the way it is? I just assumed objects in GS2 were similar to Classes in C# and C++… where you can set its properties to be read and written to.
Thanks for taking the time to read this.