atom
proc
Bumped()
mob
Bump(atom/obstacle)
obstacle.Bumped()
mob
Enemies
XP=0
LIVE=0
PLIVE=0
player=0
var/mob/Player/M
New()
. = ..()
spawn()
Wander()
// XP0()
// proc
// XP0()
// src.XP=0
// spawn(1)
// XP0(src)
proc/Wander()
while(src)
if(M in oview(5)) //if a Player comes in 5 steps pf him
step_towards(src,M) //Chase him!
for(M in oview(1)) //here you can define some stuff
break //if you want your NPC to shoot make it so
for(M in oview(2)) //these are saying if the Player is within 1,2,3,4 blocks do nothing
break
for(M in oview(3))
break
else
step_rand(src) //if no NPC is 5 blocks or less away walk around
sleep(10) //stop for 1 second
for(M in oview(4)) //.......
break
sleep(5)
spawn(5)
Wander()//Wonder again...
Bump(mob/Player/M, mob/Player/Allies/M)
if(M.player == 1) //If the NPC bumps you
// if(!istype(M))
MFight(M)//Fight You!
else
Wander()
Problem description:
i keep gettin runtime errors and proc problems.
_______________________________________________
runtime error: Cannot read null.player
proc name: Bump (/mob/Enemies/Bump)