B
Brian Le
Guest
Good morning, afternoon, evening wherever you are, today, I want to ask you something pretty simple to all of you, about Instance ID. I have known that there are 2 built-in variables for referring the Instance ID, which are object_index and id. However, after creating a variable and store the value of the Calling Object, it still didn't work. Here is my code
Obj_Police Create Event:
Obj_Police Step Event
The above code checks the id of the police gun and the police, and stick them together base on the ID.
However, it didn't work although no errors were found.
Please help me with that, thanks a lot!
Obj_Police Create Event:
Code:
var self_id = id;
var inst = instance_create(x,y,obj_police_gun);
Code:
with (inst) {
x = self_id.x-2;
y = self_id.y-2;
}
However, it didn't work although no errors were found.
Please help me with that, thanks a lot!