Not logged in
Register | Login

Menu:

Game Maker Extensions Menu:

av. 6/10 | Who rated

Credit to Kyle_Solo

Downloads: 2728

Tags:

Get a refer button for this extension!

BBcode

html [example]
download
[download]

AI

Posted by Kyle_Solo on October 31, 2007

Helps in making intelligent AI. Very easy to use, and with a detailed help file.


» Add a Screenshot


Functions:

ai_create()

Returns the id of the AI. You need that in later functions.

Returns ai id

ai_addcommand(id,script,arg0,arg1...)

Tells the AI: "Do this script right now, then resume what you were doing." You only need to call this once per command. I use it when the AI needs to complete a task (such as killing an enemy) and then continue with what it was doing (such as patrolling around a base).

ai_insertcommand(id,script,arg0,arg1...)

Tells the AI: "Do this script after completing all your other commands." You only need to call this once per command. I use it when defining things that need to take place in sequence, such as a patrol pattern.

ai_number(id)

Returns the number of commands left in the stack

Returns Number

ai_step(id)

Performs a step for the AI.

ai_erase(id)

Clears all commands from the AI.

ai_getcommand(id)

Returns the index of the current script the AI is running (or -1 if no script is running).

Returns Script Index





You not logged on! It is recommended you logon before commenting so we can tell who you are!

Comments:

7:07pm, 29 Feb 2008
sagefox

Great functions, it should make my AI programming much easier!

4:30pm, 25 Apr 2008
crimestarter

i need help they save files as GEX idk how to get it on gm so i can use it can someone help

10:56am, 24 Feb 2009
Kyle_Solo

Update! Bug fixed when the only script left on the stack returns -1.