ID:178965
Mar 11 2002, 2:56 pm
|
|
How would I make it so that enemies only attack players not each other?
|
Mar 11 2002, 2:57 pm
|
|
you just do.
|
Here's a code that might help although it gives runtime errors -_-
mob NPC bat name = "Bat" icon = 'bat.dmi' HP = 20 MaxHp = 20 Str = 8 Exp = 16 Enterif = 0 var/mob/PC/P New() .=..() spawn(1) Wander() proc/Wander() while(src) if (P in oview(5)) step_towards(src,P) else step_rand(src) for(P in view(src)) break sleep(5) spawn(40) Wander() Bump(mob/M) if (M.key) Attack(M) Attack(M) flick("attack",src) sleep(2) var/damage = rand(1,Str) M.HP -= damage M.Die() |
Here's an example:
mob/NPC Hope I helped. ~~~~SSJ4_Gohan_Majin |
In response to SSJ4_Gohan_Majin
|
|
You don't have my permission to use my code for helping people anymore. The code in your post was used in Nadrew's leveling system.
|