Page 1 of 1

how do i destroy actor that the mouse is over

PostPosted: Tue Dec 15, 2009 5:18 pm
by lllllsp1d3rlllll
i want to make a shoting game with a 3 actors main actor that wont move much and stay at the bottom and a secont one that will folow the mouse like a cross hairs like a + sign and a enemy actor. so how do i get the actor that the cross hiars is on to detroy if the cross hiar actor IS over top of it with mouse down function like a gun trigger?

Re: how do i destroy actor that the mouse is over

PostPosted: Tue Dec 15, 2009 6:12 pm
by Hblade
Add the event - mouse enter - Destroy Actor, select the actor

Re: how do i destroy actor that the mouse is over

PostPosted: Tue Dec 15, 2009 7:09 pm
by DST
On crosshair>create actor>

EventDisable("Event Actor", EVENTMOUSEBUTTONDOWN);

then simply use mousebuttondowns on the actors you wish to shoot to destroy them.

Doing it this way will preserve the ZDepth of the actors to be shot (Very useful for when an enemy is hiding behind something).

Re: how do i destroy actor that the mouse is over

PostPosted: Tue Dec 15, 2009 7:16 pm
by Hblade
I tried that once, but for some reason it still failed O.o