GameSalad

Howdy, Stranger!

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

How to add change direction on collision and random movement?

So... I started working on a game but i am stuck. I want an actor to go about randomly in any direction on the screen and bounce off from the borders into the opposite direction. But when i set collision attribute it just bounces of and collides again and again in the same spot until the actor for border itself gives it a way off screen by flipping over. SO can someone please help me with detailed instructions?

Thanks! any help is appreciated.

Comments

  • tonymtbirdtonymtbird Posts: 10Member, PRO

    rule: when actor receives event : overlaps or collides : with (any actor or tag ) (name) then i think you want the change velocity behavior? in expression editor you can insert function random (min, max)

  • RThurmanRThurman Posts: 2,842Member, Sous Chef, PRO

    Sounds like you might be using a movement method that keeps the actor going in the direction it started.

    You might be using a constrain attribute behavior when you probably really want a change attribute action.

Sign In or Register to comment.