mob
enemy
BadGuy
name= "HighwayMan"
icon = 'Base.dmi'
H2h = 1
maxhealth=10
health = 10
exp=0
max_exp=10
NPC=1
New()
..()
wander(src)
MonsterAttack()
For some reason the enemy attack proc is not being called up
here is the enemy attack proc
mob
proc
MonsterAttack(mob/M)
var/damage = round(usr.h2h*1.5)
var/hit = rand(1,100)
if(hit <= 50)
M.health -= damage
M<<"[src] hit you for [damage] damage!"
else
M<<"[src] attempted to hit you but misses!"
if(M.health <= 0)
DeathCheck(M)
also with this setup I get the following error codes
NPC.dm:169:error: M: undefined type: M
NPC.dm:167:warning: M: variable defined but not used
NPC.dm:188:error: if: extra args
NPC.dm:185:warning: M: variable defined but not used
I have looked at forums demo and a few enemy AI demos as well and cannot find anything out I know byond used to have a error code listing but i am unable to locate it at this time so any help with this would be great ohh also cant find anything in my printout of the DM Guide
http://www.byond.com/developer/Djdovis/NewWorldPart2
as for your code theres actually nothing there to make the enemy attack