need help with calling local variable

V

VaygrEmpire

Guest
So far I've been unlucky with calling local variable from other object.

I'm trying to spawn flaks based on variable TimeCount which is created and set in obj_timer.

So, I'm trying to call it through obj_timer.TimeCount but this is not working. Shouldn't I be able to call a local variable with object name in front of it?

Thanks for any help in advance!
 

Attachments

T

Tomas Frinta

Guest
There are local, instance and global variables. You can access instance variable from other instances like this: instanceName.variableName = 5;
 

jazzzar

Member
hey, actually i don't know if these drag and drop work like this :p , i dropped using that back in 2013 i think and started gml, use that same condition in a block of code and see if it works
 
V

VaygrEmpire

Guest
if I'm checking for TimeCount, below is correct, right?
Code:
 if (obj_timer.TimeCount == 280) { ... }
 
V

VaygrEmpire

Guest
Found it. Silly me. It was operator problem. Thanks for helps though! Using gml solved much more.
 
Top