ID:259422
 
When i test run my game, AOH, it starts good, but about 2 or 3 minutes in to the game it starts laging, is it possable to have to many sleep proc's going at once?

And ok, is there a way to make an NPC(when Bumped) to say soming, then check a few var's and if the Mob's strangth, MaxHealth,Speed,etc,etc. If it is at the right amount, change the mobs icon?



~~~~~~JOS~~~~~~
The lag is probably caused because you missed something in the code that is repeating itself rather often, and does a decent amount of processing each time it does it. That's what usually happens for me. It could also be some strange Byond bug like the one Deadron pointed out, but that's less likely.

As for the other code, sure, that's easy.

proc/Bumped()

mob/Bump(M)
M.Bumped()

mob/trainer/Bumped()
if(yadda)
//do the stuff you wanted.


However, questions like this are usually better asked at Newbie Central.
In response to GateGuardian
heh, i'f tryed something like that, but it all ways ends up the NPC changing icons,But i'll look in the the lag thing, thanks Gate