Thread: Player ap bar
View Single Post
  #6  
Old 12-01-2009, 08:19 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by fowlplay4 View Post
Any layer 4 and over can be displayed, so you can do things like..

changeimgvis(200, 5);

but the GS2 way is using findimg like so:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
drawAPBar();
  
setTimer(0.05);
}

function 
drawAPBar() {
  
with (findimg(200)) {
    
image "armageddon-bar.gif"
    
20;
    
20;
    
layer 4;
  }
  
with (findimg(201)) {
    
image "armageddon-ap.gif";
    
20;
    
20;
    
layer 5;
  }
}

function 
onTimeout() {
  
// Adjust the image width here using changeimgpart or partw, parth variables.
  
setTimer(0.05);

It's perfectly fine to use changeimgvis(200, 5); :P

EDIT: What Crow said ^
Reply With Quote