mob
hollows
Weak_Hollow
icon='hollows.dmi'
name="Weak Hollow"
race="Hollow"
mhp = 50
hp = 50
rei = 50
mrei = 50
strength = 7
defence = 7
reiatsu = 7
npchollow = 1
player = 0
firing = 0
proc/Battle()
for(var/mob/A in get_step(src,src.dir))
if(src.firing == 1)
sleep(40)
src.firing = 0
else
var/damage = src.strength * 1.2 / A.defence
A.hp -= damage
A << "[src] attacks you for [damage] damage!!"
src<<"You attack [A] for [damage] damage!!"
DeathCheck(A)
src.firing = 1
sleep(15)
New()
walk_rand(src,12)
. = ..()
AI()
proc
AI()
while(src)
var/c = 0
for(var/mob/M in oview(3,src))
if(M.client)
c = 1
if(c)
for(var/mob/M in oview(2,src))
if(M.client)
step_towards(src,M)
else
walk(src,0)
sleep(10)
Bump(mob/M)
if(M in oview (1))
src.canattack = 0
Battle(M)
Problem description:
hmm well , i can only get it to stand still and attack in oview or i can get it to walk randomly. but when i try to make it walk randomly then attack when the player is in its view it just walks around and ignores the AI, so what im asking is i guess, how can i make both work at once ive tried like 3-5 different ways but they end up only taking 1 action as well, any help with this will be appriciated