ID:179527
 
ok i have an NPC in my game( a mob that is not controlled by a human.) and I am trying to get him to start a proc called {"GroupCheck()" to check if all group members are in site then it calls a bunch of other procs, ect. my prob is I cant even get the mob to start doing that proc. Here is part of my code


mob
proc
GroupCheck()
ect//all the stuff it does
Zeon
Stats//all of his stats
GroupCheck()


I know I'm doin somethin wrong. Anyone want to "enlighten" me on this prob and maybe help out.
BrollyX wrote:
ok i have an NPC in my game( a mob that is not controlled by a human.) and I am trying to get him to start a proc called {"GroupCheck()" to check if all group members are in site then it calls a bunch of other procs, ect. my prob is I cant even get the mob to start doing that proc. Here is part of my code


mob
proc
GroupCheck()
ect//all the stuff it does
Zeon
Stats//all of his stats
GroupCheck()


I know I'm doin somethin wrong. Anyone want to "enlighten" me on this prob and maybe help out.

Try doing this:
mob
     proc
          GroupCheck()
     Zeon
          New()
               GroupCheck()

In response to Bingis
The proc runs now, but I ran into another problem. In my proc "GroupCheck()" I want to make it so that if "Heck_Leader" is within 1 space of "Zeon", "Zeon" starts walking, if not he waits for "Heck_Leader". But instead not even one NPC moves.

so heres my code again,the indenting looks to little here but i had to indent less so the bulky code would fit on the line.

mob
proc
GroupCheck()
if(/mob/Gang1/Heck_Leader in oview(1))
Walk()
else
GetTogether()
spawn(10)
GroupCheck()
Walk()
step_rand(/mob/Gang1/Zeon)
GetTogether()
walk_towards(/mob/Gang1/Heck_Leader,/mob/Gang1/Zeon,1)
Gang1
Zeon
Stats//his stats
New()
GroupCheck()
Heck_Leader
Stats//his stats



In response to BrollyX
BrollyX wrote:
mob
proc
GroupCheck()
if(/mob/Gang1/Heck_Leader in oview(1))
Walk()
else
GetTogether()
spawn(10)
GroupCheck()
mob
proc
GroupCheck()
for(var/mob/M in oview(1))
if(istype(M,/mob/Gang1/Heck_Leader))
Walk()
else
GetTogether()
spawn(10)
GroupCheck()

See if that works
In response to Bingis
It doesn't work, Thank you for trying though, anymore ideads?