How to get actor to come to a stop when it hits another actor

I have a hero, and I have a movable object that should

a) keep moving if hero gets in front of it and tries to stop it
b) push the hero forward if the hero does not get out of the way

Think man getting in front of moving bulldozer. The bulldozer won't crush the man, but it will keep pushing him in one direction.

I have checked the forum, but most of the answers involve restitution, which my version of Game Salad does not have.

I currently have the rule...

when actor a collides with actor b

but I don't know what action to put beneath the rule.

Thanks.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Think man getting in front of moving bulldozer. The bulldozer won't crush the man, but it will keep pushing him in one direction.
    If that's what you think, don't try this at home. 8-X

    You could have a rule that says when when the actors collide, constrain the hero's x position to an offset of the bulldozer's x position (e.g. bulldozerX-100 if it was moving left).

    Or you could just use a Collide behavior without a rule condition. Restitution was renamed to bounciness in the actor attributes.

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

  • InovaTechInovaTech Member Posts: 161
    set the dencity very high of onw actor and the other will stop when hits it. in order to do that you have to set both actors a specific dencity and one might be not moveable. then set to one actor a rule: bounce when collides with the other actor
  • echoinkechoink Member Posts: 11
    haha! If that's what you think, don't try this at home. I'm not sure if I did it the best way, but it seems to be working.

    The bulldozer recoils a bit no matter how dense I make it or how low the bounce is. For some graphics, this recoil looks okay, but for the bulldozer, how would i make it "hundred-ton" solid--immovable?

    I set the density to 9999999999 to see what would happen, and the numerical entry changed to somthing like J9+z37. Not sure what that was, but the graphic didn't behave any differently than 9999, its current setting.
Sign In or Register to comment.