mob/monster
Kamek
icon = 'Kamek.dmi'
hp = 1000
maxhp = 1000
npc = 1
flying = 1
New()
. = ..()
spawn()
Wander()
proc/Wander()
while(src)
step_rand(src)
var/mob/P = locate() in oview(10)
if(P)
if(P.npc == 0)
if(src.dir == WEST||src.dir == NORTH||src.dir == SOUTH)
var/obj/Attack/O = new/obj/Attack(src.x+2,src.y,src.z)
src.icon_state = "magic"
walk(O,P)
sleep(20)
P.hp -= 10
P << "You were hit by Kamek's magic."
src.icon_state = ""
del(O)
if(src.dir == EAST||src.dir == NORTH||src.dir == SOUTH)
var/obj/Attack/O = new/obj/Attack(src.x-2,src.y,src.z)
src.icon_state = "magic"
walk(O,P)
sleep(20)
P.hp -= 10
P << "You were hit by Kamek's magic."
src.icon_state = ""
del(O)
Bump(mob/M)
if(ismob(M))
if(M.npc == 0)
Fight(M)
..()
else
return
proc/Fight(var/mob/M)
var/damage = 10
if(M.hp <= 0)
M.hp -= damage
M << "<font color = white><font face = 'Comic Sans MS'>[src] attacks you for [damage] damage!!"
src<<"<font color = white><font face = 'Comic Sans MS'>You attack [M] for [damage] damage!!"
Death(M)
if(M.hp >= 0)
M.hp -= damage
M << "<font color = white><font face = 'Comic Sans MS'>[src] attacks you for [damage] damage!!"
src<<"<font color = white><font face = 'Comic Sans MS'>You attack [M] for [damage] damage!!"
Death(M)
Problem description:Well, what I'm trying to do is make it so Kamek(the monsters name) wanders around the area and if someone is near her she uses a magic attack by first changing her icon state to magic then shooting the magic. I tried for a long time and couldn't get it working how I wanted it. Any help?
Make this fixes, and then reply as to whether anything was helped. We can go from there.