STOP THAT ACTOR

I have an actor, moving with the move command, down he screen, I want it to stop where it is if it is hit by another actor, a bullet, I have tried a few things and nothing seems to stop the actor. Anyone got any ideas. Thanks for the help

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Create a self boolean attribute called "Stop".

    Pur your move behavior in a rule that says: When attribute self.Stop is false, move to direction whatever.

    Create another rule in that actor:
    When overlaps or collides with Bullet,
    change attribute self.Stop to true.

    That should do it.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    But triggering a boolean self.Stop won't actually stop the actor. Try changing self.Motion.Linear Velocity.X to 0 and self.Motion.Linear Velocity.Y to 0 when that boolean is true.

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

  • totg3dtotg3d Member Posts: 9
    I tried that before i posted, it does not bring the motion to zero, so it must be something else all together. I will continue to tweak, thanks for taking the time to respond
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    How about this?

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

Sign In or Register to comment.