After an enemy gets defeated I want another instance to pop up but want the instance that pops up id number so the code I put after it only accounts for that instance that pops up.
Thanks!!!
How to get an instances id after being created
Started by DcoldSaviour77, Feb 25 2012 10:28 PM
5 replies to this topic
#1
Posted 25 February 2012 - 10:28 PM
#2
Posted 25 February 2012 - 10:43 PM
instanceID = instance_create(x, y, object);
#3
Posted 26 February 2012 - 06:00 AM
Just wondering so I don't have to put anything else? Everything after that will only apply to that id?instanceID = instance_create(x, y, object);
#4
Posted 26 February 2012 - 06:33 AM
You need to use the variable in conjunction with what you're doing. So if you want to set that particular instance's speed, you would use
instanceID.speed = 10;
just like you would using the object index.
instanceID.speed = 10;
just like you would using the object index.
#5
Posted 26 February 2012 - 06:38 AM
if you want it to make it perform a functions then you have to use with
with(instanceID){
instance_destroy()
}
#6
Posted 26 February 2012 - 06:41 AM
K, Thanks!!!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











