GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Help - Actors sliding along walls & Actors behind each other Issues

singhmrpsinghmrp Posts: 6Member
edited April 2012 in Working with GS (Mac)
Hi all,

I'm new to GameSalad however am experiencing 2 issues, I've spent the last few days trying to resolve however had no luck - hope someone here can help.

Issue 1 - I have 4 walls along the edge of the screen. There are 3 actors which randomly move around the screen and collide/bounce off the walls. The issue I'm experiencing is once the actors touch the wall, they somehow 'attach' to it and continue to slide along there. What I want is for them to simply bounce off and continue.

Issue 2 - The actors mentioned above should be destroyed on being pressed. However if there are 2 actors behind each other, on tapping one, the one behind also gets destroyed. How do i avoid this?

Look forward to your replies.

Thanks.

Best Answers

  • tatiangtatiang Posts: 11,786Member, Sous Chef, PRO, Senior Sous-Chef
    Accepted Answer
    Use Change Velocity or Change Attribute self.motion.linear velocity.x/y to [random values] instead of Move or Move To.

    In the wall actor's attributes, change the Physics-->Restitution value to something high enough to create a bounce (1 or more).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • MotherHooseMotherHoose Posts: 2,456Member
    Accepted Answer
    issue#2 … have the actors collide with each other … so they are never in an overlapping state???

    image MH
  • MotherHooseMotherHoose Posts: 2,456Member
    Accepted Answer
    sorry missed your post yesterday … @singhmrp

    if your actors are in your scene:

    demo: http://www.mediafire.com/?gel8198f27fbk7f

    image MH

Answers

  • singhmrpsinghmrp Posts: 6Member
    edited April 2012
    Hey - great that was it. Note I also had to change X.Velocity and Y.Velocity to minus values when it collided with the wall to prevent it sliding.

    Any ideas on issue number 2?
  • singhmrpsinghmrp Posts: 6Member
    Hi,

    Yes that to prevent overlapping does solve the issue however I would like the actors to go behind each other.

  • singhmrpsinghmrp Posts: 6Member
    Thanks - I see it now.
This discussion has been closed.