basic ai movement

ovechkin8ovechkin8 Member Posts: 42
edited November -1 in Working with GS (Mac)
Im having trouble workin out a plan with some basic enemy movement. I want the actor to start in a set postion and just float in a random direction and bounce all around the screen. I have tried a few different ways but nothing seems to be the way I want.

Any help would be awesome.
Thanks

Comments

  • DanielAvniDanielAvni Member Posts: 114
    hey dude im not the best but just look at this example by codemonkey
    http://gamesalad.com/game/play/25978
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    http://gamesalad.com/game/play/36936

    You can check out the movements of the Dougs in this game. They are the "enemy" of innocent girls everywhere. If that's the idea, here's how i did it:

    Create invisible walls just outside of the camera view. In the enemy:

    RULE When collides with wall
    change velocity
    angle - random(0,360)
    speed - random(100,200)

    or you could do it on a timer instead of the walls.

    EVERY .5 seconds (or whatever you want)
    change velocity
    angle - random(0,360)
    speed - random(100,200)
Sign In or Register to comment.