View Single Post
  #1486  
Old 07-14-2012, 03:31 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
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.xplayer.1);
  
this.changeimgpart(201004816);
  
temp.bg.layer 2;
  
temp.bg.attachtoowner true;

  
this.bar this.showimg(202"classic_gc_flagbearer_bar.png"player.0.3125player..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(202516max(138 * (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.xplayer.1);
    
this.changeimgpart(201004816);
    
temp.bg.layer 2;
    
temp.bg.attachtoowner true;

    
this.bar this.showimg(202"classic_gc_flagbearer_bar.png"player.0.3125player..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(202516max(138 * (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().
Reply With Quote