View Single Post
  #1  
Old 06-02-2007, 05:50 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Archetypes with Gani Script

I have a gani script and I'm trying to load archetype variables. But it doesn't work.

PHP Code:
SCRIPT
function onCreated() {
  
this.baddyname = "Default";
  
getBaddy();
  
onTimeOut();
}

function 
getBaddy() {
  
this.baddy.loadVars(
  
format("archetypes/baddies/%s.arc", this.baddyname));  
}

function 
onTimeOut() {
  
showtext( this.index, this.x+2, this.y+3,"Verdana", "c",
    
this.baddy.nick);
  
showtext( this.index+1, this.x+2, this.y,"Verdana", "c",
    
this.baddy.hp @ "/" @ this.baddy.fullhp);

  
changeimgzoom( this.index, 0.75);
  
changeimgzoom( this.index+1, 0.75); 
     
if (
this.baddy.hp > this.baddy.hp/3) 
  
changeimgcolors( this.index+1, 0, 1, 0, 0.99);
if (
this.baddy.hp < this.baddy.hp/3)
  
changeimgcolors( this.index+1, 1, 1, 0, 0.99);
if (
this.baddy.hp < this.baddy.hp/6)
  
changeimgcolors( this.index+1, 1, 0, 0, 0.99); 

if (
this.baddy.aggressor == 0) changeimgcolors( this.index, 0, 1, 1, 0.99); 
if (
this.baddy.aggressor == 1) changeimgcolors( this.index, 1, 1, 0, 0.99); 
if (
this.baddy.aggressor == 2) changeimgcolors( this.index, 1, 0, 0, 0.99); 

setTimer(0.05);
}
SCRIPTEND 
__________________
Deep into the Darkness peering...
Reply With Quote