A.I. Code

by Rifthaven
Learn how to create an A.I. system for mobs. Have enemies who attack on sight and those who attack when you attack them! Uses little CPU usuage since they only move when they are in your screen! Comes with Attacking system aswell.
To download this demo for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Rifthaven.A.I.Code##version=3

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Rifthaven.A.I.Code##version=3

4289 downloads
Version 3
Date added: Jul 5 2003
Last updated: Jul 29 2009
15 fans

Comments

Surge mage: (Nov 16 2018, 3:02 pm)
trying to use this but it seems like my monsters are throwing runtime errors by bumping into walls:

untime error: undefined variable /turf/wall/var/client
proc name: Bump (/mob/Monsters/enemy/Bump)
usr: (src)
src: the enemy (/mob/Monsters/enemy)
src.loc: the tunnelfloor (22,40,1) (/turf/tunnelfloor)
call stack:
the enemy (/mob/Monsters/enemy): Bump(the wall (22,39,1) (/turf/wall))
the enemy (/mob/Monsters/enemy): Move(the tunnelfloor (22,40,1) (/turf/tunnelfloor), 2, 0, -13)
the enemy (/mob/Monsters/enemy): Wander()
the enemy (/mob/Monsters/enemy): New(the tunnelfloor (22,41,1) (/turf/tunnelfloor))