How to Tap/Touch a rectangular mask then make an Actor1 move and Hit another Actor2
artlover
Member, PRO Posts: 16
Hello
I have this simple questions:
- How to Tap/Touch a rectangular mask then make an Actor1 move and Hit another Actor2.
- When the Actor2 Hit by Actor1, Actor2 will be destroyed and another Pen (Actor1) will appear and another Object (Actor2) will appear...and so on.
Thank You Very Much guys!
(see image below)
Comments
You can communicate between actors by changing the values of game attributes. It's not clear how you want Actor 1 to move but I'll take a stab at #1:
Rectangle Mask actor:
If touch is pressed
Change attribute game.touching to 1
Else
Change attribute game.touching to 0
Actor 1:
If attribute game.touching = 1
Move [angle 90] [speed 150]
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Hi @tatiang thank you very much for your answer... I'll try this out now
Anyway @tatiang I've tried this out, but I wonder where to find the "game.touching" I'm using windows to create games. (see image below) thanks
You make the attribute yourself.
Yes, anything that's not built into GameSalad can be added. In this case, game.touching would be a custom attribute, an integer.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks guys @tatiang @Socks great info!
Thank you