M
MadTinkerer
Guest
Getting the value of instance variables is easy. You can just say myNumber = obj_OtherObject.myNumber or something like that and it will work. You can also get the value of certain variables. object_get_sprite will get the sprite index of an object. object_get_parent will get the index of the parent object of an object.
But is there a way to get the value of an object variable set in the object editor without creating a new instance of the object? You can use event_perform_object to perform the event of an object. But as far as I can tell, you can't get, let alone set, the value of an object's object variable unless you instantiate it into an instance and check that instance's variable. If I change an instance's variable and I want to check what the variable was originally set in the object editor, do I really need to make a new instance of it?
Am I missing something?
But is there a way to get the value of an object variable set in the object editor without creating a new instance of the object? You can use event_perform_object to perform the event of an object. But as far as I can tell, you can't get, let alone set, the value of an object's object variable unless you instantiate it into an instance and check that instance's variable. If I change an instance's variable and I want to check what the variable was originally set in the object editor, do I really need to make a new instance of it?
Am I missing something?
Last edited by a moderator: