proc
attacking()
if(src.fight==1)
for(var/mob/M in oview(4))
if(M.client)
walk_towards(src,M,10)
if(src.dir==1||src.dir==2||src.dir==4||src.dir==8)
for(M in get_step(src,src.dir))
src.monsterattacking(M)
else
continue
else
continue
else
walk_rand(src,10)
spawn(7) attacking()
New()
walk_rand(src,10)
attacking()
ID:269147
Mar 22 2005, 2:04 pm (Edited on Mar 22 2005, 2:28 pm)
|
|
how do i make it where instead of the mob walking around and attacking players how do i make it where the player has to attack the NPC for the NPC to attack him/her.
|
Mar 22 2005, 2:31 pm
|
|
It would realy be helpful to know, like how Seika has mobs that just stand there until you get close to them or attack them. Im making a game, started today, ive already gotten status but i need to add mobs to increase status. I got 82 monsters to make and i want to use the stand still until attacked in 60 of them.
|
In response to Contract Jack
|
|
create a variable for attack and use that to switch on and off when a player has attacked the mob.
Like your dude is attacking: attacking = 1 |
If I understand what you're saying it's as simple as calling an attack procedure for NPCs when they've been attacked.
mob/verb/attack(mob/defender as mob in oview(1)) |