I wouldn't say this is a V6 bug as it happens on V5 as well, but sometimes when you apply a scripted gani attribute to a player, and a different player then logs on within the same level, that different player will not see the resulting displays of that gani, or they might see it and then it will quickly disappear. If a different player were to simply enter the level for the first time however, then it works fine.
An example of what I'd like to be able to do:
PHP Code:
SCRIPT
function onPlayerEnters(){
temp.bg = this.showimg(201, "classic_gc_flagbearer_bar.png", player.x, player.y - 1);
this.changeimgpart(201, 0, 0, 48, 16);
temp.bg.layer = 2;
temp.bg.attachtoowner = true;
this.bar = this.showimg(202, "classic_gc_flagbearer_bar.png", player.x + 0.3125, player.y - .75);
this.update();
this.bar.layer = 2;
this.bar.attachtoowner = true;
this.setTimer(1);
}
function onTimeout(){
if(player.attr[13] != this.fbpoints){
this.update();
}
this.setTimer(1);
}
function update(){
this.fbpoints = player.attr[13];
this.changeimgpart(202, 5, 16, max(1, 38 * (this.fbpoints / 200)), 8);
}
SCRIPTEND
An example of what I'm having to do:
PHP Code:
SCRIPT
function onPlayerEnters(){
this.onTimeout();
}
function onTimeout(){
if(this.bar == NULL){
temp.bg = this.showimg(201, "classic_gc_flagbearer_bar.png", player.x, player.y - 1);
this.changeimgpart(201, 0, 0, 48, 16);
temp.bg.layer = 2;
temp.bg.attachtoowner = true;
this.bar = this.showimg(202, "classic_gc_flagbearer_bar.png", player.x + 0.3125, player.y - .75);
this.update();
this.bar.layer = 2;
this.bar.attachtoowner = true;
}
else{
if(player.attr[13] != this.fbpoints){
this.update();
}
}
this.setTimer(1);
}
function update(){
this.fbpoints = player.attr[13];
this.changeimgpart(202, 5, 16, max(1, 38 * (this.fbpoints / 200)), 8);
}
SCRIPTEND
There are also no other gani attributes in use at the same time which could explain the disappearance, as I know that sometimes using the same index in 2 different gani scripts can cause conflict.
I also get the same problem with similar displays that have no timeouts involved, contained entirely within onPlayerEnters().