How to make an actor move by itself in random directions

Hi guys ,

Pls pardon me cos I'm new here . Ive searched for how to make actor move randomly but the actor in their templates keep going in a specific direction no matter how many times u reset the game . Ive tried to place walls and hope that the actor would so called ' bounce off ' of the walls and go to a different direction but it doesn't work . I need to know how to make the actor move by itself in random directions without leaving the screen . Every time when the game is reset , the actor should move in different direction .

Tks

Comments

  • nir3112nir3112 Member, PRO Posts: 312
    edited May 2014

    Inside the moving actor
    Make a rule
    'When touch is pressed -> move to -> random(min,max)'
    *change the x and the y to what numbers you want the actor to move to.

    Make the random in the X and Y
    In the move to behavior
    Now every time you press on the actor his position will changed.

  • TosanuTosanu Member, PRO Posts: 388

    I recommend having a random that starts when the actor is created, Random (0,359) (or whatever range of directions you want.

    And then create a Change Velocity to go in direction(random number that you got).

Sign In or Register to comment.