Dan1
Member
Hey guys,
I'm having a little trouble trying to identify an objects name by a given ID.
Where global.idremove is the unique ID number given to each object (and the value of the variable is loading correctly according to the debug settings), I'm trying to check if the ID that matches that value is a certain object, but it's not, for some reason, giving me the right output.
I've tried:
and no matter what, it doesn't return the value of 1 for global.building
Any idea where I'm going wrong with this?
Much appreciated!
I'm having a little trouble trying to identify an objects name by a given ID.
Where global.idremove is the unique ID number given to each object (and the value of the variable is loading correctly according to the debug settings), I'm trying to check if the ID that matches that value is a certain object, but it's not, for some reason, giving me the right output.
I've tried:
Code:
if object_get_name(global.idremove) = ob_Conveyor then global.building = 1
Code:
if object_get_name(global.idremove) = "ob_Conveyor" then global.building = 1
Code:
if asset_get_index(object_get_name(global.idremove)) = ob_Conveyor then global.building = 1
Any idea where I'm going wrong with this?
Much appreciated!