DullShrimp129
Member
I currently have multiple objects of O_Car i want to find the specific object of O_Car that the player is colliding and not all cars so because of every object has a unique ID I find the ID of the object, however i do not know how to call it so i destroy the object
Code: Car
if(KeySpace) &&place_meeting(x,y,O_Player)
{
if(instance_exists(O_Player))
{
O_Player.CarSet = id;
}
}
Code: Player
instance_destroy(CarSet);
You can not destroy an object by its ID so how could you use the ID to specifically destroy the car which is being collided with?
Code: Car
if(KeySpace) &&place_meeting(x,y,O_Player)
{
if(instance_exists(O_Player))
{
O_Player.CarSet = id;
}
}
Code: Player
instance_destroy(CarSet);
You can not destroy an object by its ID so how could you use the ID to specifically destroy the car which is being collided with?