how do i destroy actor that the mouse is over

Game Editor comments and discussion.

how do i destroy actor that the mouse is over

Postby lllllsp1d3rlllll » Tue Dec 15, 2009 5:18 pm

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?
for more from me check out my web site!!!
http://venom-codings.bravehost.com/index.html
lllllsp1d3rlllll
 
Posts: 27
Joined: Sun Dec 13, 2009 6:26 pm
Score: 1 Give a positive score

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

Postby Hblade » Tue Dec 15, 2009 6:12 pm

Add the event - mouse enter - Destroy Actor, select the actor
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

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

Postby DST » Tue Dec 15, 2009 7:09 pm

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).
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

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

Postby Hblade » Tue Dec 15, 2009 7:16 pm

I tried that once, but for some reason it still failed O.o
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron