How to make actors shield others from touches.
Say I have some bad guys you are supposed to tap to destroy them but in certain places they go under cover and you don't see them because they are covered by a roof, building, trees, etc...
How do I set the actor or the "covering actor" to only be hit when its not covered by another actor?
In a similar way I am also trying to solve the problem of the touches not hitting every actor that is over lapping. Some of my actors converge and when you tap them it hits all of them at that location. Is there a way to make it only hit the top one?
I am guessing that these two questions are linked in some way.
Thanks for the help!
Best Answers
-
SmokeyAce73 EarthPosts: 370
Create a boolean attribute for UnderCover Have it set to false
Add rules to the roofs if actor overlaps or collides with player turn UnderCover to true
Where you have the rules to tap to destroy just add if attribute UnderCover is false then destroy
Developer For BLUNTentertainment - Feel Free To Message Me! - Free Beginner Templates!
-
tatiang Posts: 11,949
The only thing I would add to what @SmokeyAce73 wrote is that you'll want the Otherwise section of that rule to change the UnderCover attribute back to false so that when the cover actor is no longer in contact, it doesn't prevent tapping & destroying.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User