okay here's my drama ive tryed heaps of demo's but i cant seem to get it to work. In my game if you kill a particular mob (Thug1) then i want all the mobs of kind (Thug2) to run up and attack the usr when they see him.
any help will be appreciated, thx
- sam
ID:178678
Apr 18 2002, 3:52 am
|
|
In response to Winbiko
|
|
it didnt work i dont think i explained it properly, when you use the "shoot pistol" command on thug1 then if you walk past thug2 i want thug2 to come and attack you.
|
In response to Akarat
|
|
ohhhh ok. :) Sorry. I will type it real quick
|
In response to Winbiko
|
|
//This is what you need to do.
var/thugs[0] // all thugs mob/var/hostile[0] // hostile list for each mob // Makes a list of all thugs. mob.Thug.New() thugs += src return ..() // Manage hostile stuff. proc MngHostile() var/mob m n z spawn while(1) for(m in thugs) for(n in orange(5,m)) for(z in m.hostile) if(z==n) walk_toward(m,n,10) sleep(20) //start manage when world starts world.New() MngHostile() return ..() /* Now if someone shoots someone add them to all thugs hostile list. like this: var/mob/m for(m in thugs) m.hostile += src */ |
mob.Thug1.New()
thugs += src
return ..()
mob.Thug2.New()
thugS += src
return ..()
/*
Then in your die check func put
var/mob/m
for(m in thugs)
walk_towards(m,src,10)
*/