How to make it so when I click/touch an object it's gone
I just started using gamesalad today and never developed an app before. I have little knowledge of scripting so I thought this sounded perfect. Well I just found out I ain't the best artist either so I've decided thats the style of art in my game (poorly drawn blocks and ninjas). To cut to the chase I was wondering how to make it so I clicked one of my blocks it would disappear.
Comments
Anyway, regarding your question, there are a couple of ways to do this.
Option 1
In the actor you want to disappear when you touch it, add this rule:
When Actor Receives Event Touch Is Pressed...
Add Behavior - Destroy Actor
End Rule
Doing this will remove the actor from the screen permanently while the game is being played. If you still want the actor in the game, but just not visible, then you may want to use option 2.
Option 2
In the actor you want to disappear when you touch it, add this rule:
When Actor Receives Event Touch Is Pressed...
Change Attribute: self(which is the actor's name).color.alpha to 0
End Rule
This simply makes that actor invisible once the user touches it.
Hope that helps
- Alex