How to get actor to come to a stop when it hits another actor
echoink
Member Posts: 11
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.
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
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
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.