Author Topic: Zone events lag  (Read 815 times)

Alright so when i set up zone events for some reason I start lagging when someone enters the zone, it starts to get really choppy for me, but not them.


For reference i set up my events for this specific case pretty much like this
Code: [Select]
onMinigameReset - self - setZone - center 250 0 0 0
onplayerenterzone - minigame - modvariable [Town Bots] - Add - 1
onplayerleavezone - minigame - modvariable [Town Bots] - Subtract - 1
onplayerenterzone - minigame - ifVariable < 0
onplayerleavezone - minigame - ifVariable < 0
onVariabletrue - namebrick[Town Bots] - attemptbotspawn
onVariablefalse - namebrick[Town Bots] - attemptbotdespawn


does it lag if you replace the bot spawning with setcolor?
does it start lagging when any zone is entered or just that one?

It still lags if i set it too setcolor. So I did a few test and heres what i got


I tried it normally where when I enter the zone the bots spawn and such, and then I lag.

I tried it where when I enter a zone that does nothing but display a center print message upon entering (Keep in mind i'm doing this all in the vicinity of the bots still and they are still spawned) and I still lag.

So now I despawn the bots and enter the zone and then I have no lag.

Then I respawn the bots and then I start to lag again, but as soon as I destroy the zone brick the lag goes away.


I'm not really sure what the take from doing those tests maybe you may have an idea on what to do

Seems like it's either the zone's problem or the variables problem. Not sure why.