May 23, 2012, 03:55:27 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Prowlie Welcome back! The site migration is complete and normal service resumed.
Advanced search
Pages: [1]   Go Down
Print
Author Topic: AI help  (Read 1284 times)
0 Members and 2 Guests are viewing this topic.
Tophatwonder
Senior Member
****
Offline Offline

Gender: Male
Posts: 627


The tophat of wonders


WWW
« on: February 25, 2009, 03:17:21 PM »

Hey, after playing this game: http://armorgames.com/play/2619/the-game
I noticed he had a Aritficial Intelligence thing going on on "communism1" where the AI's randomly just walk around, but I'm not sure how to do that. I just want some AI's to move around randomly like that if possable, been looking all over for AI tutorial that randomly move around but I  can't find any. (useing flash mx 2004 btw.)

if anyone could assist me that would be great.'

Thanks.  Grin
Logged

adzy-2k6
Senior Member
****
Offline Offline

Posts: 720


« Reply #1 on: April 20, 2009, 11:39:56 AM »

Ive only just started learning actionscript 3.0, so wont be of much use. All i can say is make a random number genorator, and if it hits a certain number, the ai will decide on a random direction, see if it can go there without falling, then initialises a step function for whatever distance is needed. Sortof like:

generate random number - if random number matches trigger - begin to move - move to set distance then stop - repeat.

Im not sure if this helps much, but is an interesting problem Smiley
Logged

Brackenwood
   

 Logged
Pages: [1]   Go Up
Print
Jump to:  

Theme by Pieter, based on Black Rain by Crip Powered by SMF 1.1.16 | SMF © 2011, Simple Machines XHTML | CSS

Page created in 0.059 seconds with 23 queries.