Alright prior to using the latest gserver release, this wasnt a problem.
NPC’s such as light effects, that use if(created) and not if(playerenters), they dont work right if you reconnect in the level that they are in.
for example:
if (created) {
drawaslight;
dontblock;
setcoloreffect 1,0,0,0.5;
}
does not show the light effect, just the image of the light, it works after you update the level though. if you reconnect in a level with an npc like this in it, it messes up.
if (created||playerenters) {
drawaslight;
dontblock;
setcoloreffect 1,0,0,0.5;
}
now, a code like this one works perfectly, even if you reconnect in the level.
i dunno if this adhering to how official graal had worked but it seems weird
if (created) {
dontblock;
x=14;
y=40;
}
if (playerenters) {
setcoloreffect 1,0.4,0,0.79;
drawaslight;
this.light = 1;
timeout = 0.05;
}
if (timeout) {
this.light += random(-0.1,0.1);
if (!(this.light in |1,3|))
this.light = 1;
setzoomeffect this.light;
timeout = 0.05;
}
This code also works perfectly, so it seems that as long as ‘playerenters’ is in there, there are no problems.