what the hell? the enemies attacks the other enemies while i stand and watch. lol. i want to fix this. i think i have some mobs in the wrong place. dunno. any1 can help?
here's my enemy mob
------------------------------------------------------------
mob
Enemies
Saibamen
name = "Saibamen"
icon = 'RACENamek.dmi'
PL = 40
MPL = 40
KI = 5
MKI = 5
EXP = 25
STR = 2
var/mob/P
New()
. = ..()
spawn()
Wander()
proc/Wander()
while(src)
var/Found = FALSE
for(P in oview(5))
step_towards(src,P)
Found = TRUE
break
if(Found != TRUE)
step_rand(src)
sleep(10)
sleep(5)
Bump(mob/M)
if(istype(M))
Attack(M)
proc/SAttack(mob/M)
flick("sparpunch",src)
sleep(2)
var/DAMAGE = STR
M.PL -= DAMAGE
view(src) << "[src] attacks [M]!"
view(src) << "[DAMAGE] damage!"
M.DEATH()
------------------------------------------------------------
here's my spawn point for that monster
------------------------------------------------------------
obj/Saibamen_Spawn_Point
var/My_Spawned
New()
spawn()
SpawnCycle()
proc/SpawnCycle()
if(My_Spawned == null)
sleep(50)
var/M = new /mob/Enemies/Saibamen (src.loc)
My_Spawned = M
M:Spawned_By = src
spawn(10)
SpawnCycle()
------------------------------------------------------------
ID:147917
![]() Sep 28 2003, 12:14 pm
|
|
![]() Sep 29 2003, 3:08 am
|
|
Your problem is that you run a search for all mobs around the monster. The player's character is a mob, but so are all the enemies. In the while loop, make the monsters only step towards mobs that are attached to a client. (You could do that by adding an if(client) line)
|