New User - Trouble with Collision
NYP
Member Posts: 12
First time post. I am having trouble setting up a rule in which when one actor moves over a second actor the second actor is destroyed. Think Pac Man eating the pellets. I have it working fine in one scene with two actors - this is a scratchpad where i try stuff out - but in my second scene - the actual game scene - in which i am using two different actors, the second actor (the pellet i want to be destroyed) refuses to interact with the first actor (the munching figure). Can anyone suggest some typical schoolboy errors it sounds like i might be committing? With thanks.
Best Answer
-
tatiang Posts: 11,949Is it possible that you unlocked one of the actors on the scene? If so, you created an "instance" of the actor with its own unique rules. Try deleting your actors from the scene and re-adding them. Does it work after doing that?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
When Overlap or Collide with Pac Man
Add a Destroy Behavior in the rule.
You could/would also add a change attribute in that rule to update your score, if you want that to increase each time a pellet is eaten.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
A couple thoughts...
Are you sure you have the correct actor or tag selected in the Rule?
Are you sure your rules are active in the prototype actors and not just one instance of the actor(s)?
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page