proc/Unique(speed)
while(awake)
if (P in oview())
if(hasspells==0)
step_towards(src,P)
if(Unique==1)
step_towards(src,P)
step_towards(src,P)
else
var/V = rand(1,6)
switch(V)
if(1)
if(fireboltlevel>0)
FIREbolt()
else
step_towards(src,P)
if(2)
if(iceboltlevel>0)
ICEbolt()
else
step_towards(src,P)
if(3)
if(lightningboltlevel>0)
LITbolt()
else
step_towards(src,P)
if(4)
if(feedbacklevel>0)
FEEDBACK()
else
step_towards(src,P)
if(5)
if(poisonlevel>0)
POISON()
else
step_towards(src,P)
if(6)
if(darklevel>0)
DARK()
else
step_towards(src,P)
spawn(speed)
Unique(speed)
Problem description:
On the first part at the top, where it says "while(awake)" the awake var isnt being read for some reason. what im trying to do is, make it so all the monsters in the game are frozen, and then when monsters come in view to the player ONLY the monsters in view of the player come unfrozen while all the rest are still frozen. But the code i have for the monsters for when they come in view to turn the awake var on to 1. That "while(awake)" doesnt work, the monsters dont come unfrozen =/ even if the var is turned on. Help please??? I am doing this to reduce lag in my game.
There isn't a case I can think of where a var won't be "read" correctly.
P.S. I'm assuming the proc isn't like...a world proc, right? Who is "src" in this? Who is "p"? Kinda in the dark here.