mob/monsters
Basic_Monsters
icon='Monsters_1.dmi'
density = TRUE
Rabbit
icon_state = "Rabbit"
race = "Rabbit"
powerlevel = 25000000
maxpowerlevel = 250
strength = 10
defense = 2
kipower = 2
zenni = 10
level = 1
exp = 90
New()
.=..()
spawn(1)
NonAggresiveLook()
Move(var/turf/NewTurf,var/StepDir)
switch(StepDir)
if(NORTHWEST) pick(step(src,NORTH),step(src,WEST))
if(NORTHEAST) pick(step(src,NORTH),step(src,EAST))
if(SOUTHWEST) pick(step(src,SOUTH),step(src,WEST))
if(SOUTHEAST) pick(step(src,SOUTH),step(src,EAST))
else return ..(NewTurf,StepDir)
mob
proc
NonAggresiveLook()
var/mob/Player/M
while(src)
if(M in oview(5))
if(M.name in src.killlist)
walk_to(src,M,1,4)
if(M in oview(1))
step_towards(src,M)
else
sleep(15)
step_rand(src)
break
else
for(M in view(src))
break
sleep(5)
spawn(2)
NonAggresiveLook()
Problem description:
This is my basic AI system. I know i have to add Bump and Attack for monsters but ima go do that later.
I'm wondering how I would make a Monster shoot a projectile, when they are facing the person, but not right in front of them.
I tried with
walk_to(src,M,3,4)
But my goal is to prevent AI from facing them diagonally while standing 3 space away from them.
I also want that when monster is closer than 3 space away he will go to player
Thanks for help
insted of
You re using Move() so it can get a bit confusy