Destroy Actor when THEY are Touched?
Exterior
Member Posts: 5
Hey!, I'm new to GameSalad and have really enjoyed working on a game for the past few days! The game is almost complete however I just can't figure out a way to destroy actors when they are touched. I know how to make them destroy when the screen is touched but how can I make them destroy when THEY are touched?
Any help would be much appreciated, Thanks!
Comments
Put a rule on/in the actor you want to destroy that says:
When touch is pressed -> Destroy
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Thanks but what I mean I want it to destroy the actor on touch but only if "they" are touched not just anywhere on the screen.
Ah ! I see, yes jamie_c got it totally wrong (lucky you didn't waste your time trying his method).
The correct answer is:
Put a rule on/in the actor you want to destroy that says:
When touch is pressed -> Destroy
I'm always wrong!
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Actually 'wrong' is spelt 'wrong', not 'wrong' as you spelt it.
Don't make me laugh so hard, it hurts!
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Ahem* Any help then no? xD
Just noticed I could go "Touch -> Destroy -> Inside" but I have no way to test it, would this destroy the actor when it is touched but not the area around it? Thanks again,
Try this . . . .
Put a rule on/in the actor you want to destroy that says:
When touch is pressed -> Destroy
Try this:
Put a rule on/in the actor you want to destroy that says:
When touch is pressed -> Destroy
Or if that's not working for you, you could always try this:
Put a rule on/in the actor you want to destroy that says:
When touch is pressed -> Destroy
Wait.... what?
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Haven't you caused enough trouble in this thread with your crazy answers ?
But seriously, joking aside, do you know how could I make an actor destroy itself when it is touched ?
lol at this thread. I don't even know if this is serious or not anymore, but just in case it is...
@Exterior you set up the destroy rule inside the actor to be destroyed and set it to 'overlaps of collides with' (it automatically sets to 'mouse position', so just go through that drop down window for other options), you can set it up so that when you touch this actor with your hero actor, only then will it be destroyed, because they have collided or touched. All this is done within that 'Destroy' rule. Make sure you have your hero actor set up already so that GS knows which other actor is involved.
OR are you suggesting that your actor has a lot of transparent space in the image, and you don't want that transparent space to be part of the destroy rule? If this is the case I can honestly say that I don't know how you would get around this, but there may be someone here who can help.
For anyone that needs it, a sample project is attached.
Touch (click on) the actor to destroy, touch anywhere else and it doesn't get destroyed.
Hope it helps. Sorry about all the trouble I've caused!
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page