When an actor with wheels flips over I need the actor to stop and gameover/reset the scene.

I'm having a blast creating with GameSalad but have seem to hit an impass. I've been searching the forum for over an hour now and cant find the answer to my problem.

What I want the actor to do is roll along on its wheels like I have it doing now but when it flips over I want it to stop moving and send a gameover message. I've tried all kinds of thing, like constraining the wheels separately, but when it flips over the wheels flip over the wrong way and it still doesn't stop the actor. I'm stumped.

Help. Me. Please. :(

Comments

  • SharpSh00terSharpSh00ter Member Posts: 3
    edited January 2013
    :)
  • Sh4rpSh00terSh4rpSh00ter Member, PRO Posts: 10
    No one wants to give this one a try?
  • SocksSocks London, UK.Member Posts: 12,822
    edited January 2013
    No one wants to give this one a try?
    No one knows anything about how you have your project set up, what kind of rules you are using, how you are achieving the 'flip' and so on - which makes offering help fairly difficult.

  • Sh4rpSh00terSh4rpSh00ter Member, PRO Posts: 10
    I gotcha. Sorry for being so vague.

    Ok, so the actor is just one block with wheels on one side of it. There is a floor that the actor collides with and drives on top of. When the actor is on the floor there is a rule that tells it to accelerate to the right at 100 and there is a rule to accelerate to the bottom position at 500 to act as gravity. I also have a rule on it that if I click the screen the actor jumps upward at 1000.

    Now, the problem I'm having is when I jump and the actor hits an object, the actor flips over. When it flips over the actor keeps moving forward. I like the way it flips and moves in a sort of realistic fashion so I don't want to stop its rotation, but I want the actor to stop moving when it flips on its sides or top.

    I've tried separating the wheels from the body and constraining the two together, but the problem is when they rotate together the wheels go through the body and it keeps driving forward. I've also tried constraining both their rotations and it still wont work.

    I hope that described it well enough for someone to understand what I'm trying to convey.

    Thanks in advance.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You could have a rule set to check the actor's self.rotation for certain ranges, or you could constrain an actor to its top and sides and then have collision rules. Either way, you can change the velocity to zero when the rule(s) are true.

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

  • Sh4rpSh00terSh4rpSh00ter Member, PRO Posts: 10
    @tatiang

    Thanks man! I did a combination of rotation ranges and the actor it collides with in a single rule. Worked like a charm! Thanks for your answer.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Glad it's working!

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

Sign In or Register to comment.