Hi guys . I need some help again with the events.
I would like to destroy an object on collision if a key pressed.
I mean a copy of an object.
For example:
player:on collision with other object/do nothing,go to sub event
-sub event key pressed/destroy other object
But for some reason I can't use "on collision" and "key pressed" in the same event.If "on collision" has been used I can use only "key down".
Why is that?
I have tried to use variables,but in that case all the objects destroy
Like this:
(global variable created collision = 0)
player:on collision with other object/collision = 1
collision = 1/do nothing go to sub event
-sub event key pressed/destroy other object
In this case all the objects destroy,not only collided object because the second event don't know I have collided,it knows only collision = 1.
I know I can store UID in a variable but how can I use that in event?
I can use it like this:
player:on collision with other object/variable = object.UID
But there is no event to use it like this:
destroy object:variable = object.UID
spawn other object:variable = object.UID
Anybody could help me please?
How do I destroy a copy of an object on collision if key pressed?
How do I reference to object.UID in event?
Thanks.