Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-13-2011, 03:21 AM
Ohk4y Ohk4y is offline
Registered User
Ohk4y's Avatar
Join Date: Jun 2011
Posts: 43
Ohk4y is an unknown quantity at this point
Send a message via AIM to Ohk4y
Help with image part and gani.

Hello,

I'm trying to make a health bar show up when you have a certain amount of health and change sizes above your head according to the amount of health you have.

Currently, showing the image above the players head works and shows for everyone supprisingly (it's placed in a gani and triggered with a weapon).

Though the issue I have is, the image part changes locally.. I really need it to show for everybody because it would be useless if it couldn't.
Here is the weapon I currently have:
PHP Code:
//#CLIENTSIDE
function onCreated() onTimeOut();
function 
onTimeOut() {
  if (
player.ani == "hurt") {
  
player.attr[11] = "e_hp.gani";
  }else{
  
player.attr[11] = null;
  } 
setTimer(.05);

Here is the Gani I currently have:
PHP Code:
SCRIPT

//#CLIENTSIDE
function onCreated() onTimeOut();
function 
onTimeOut() {
  
showimg(802,"hp_bar.png",player.x-1.5,player.y-1);
  
changeimgpart(802,0,0,clientr.player.stats.curhp*102/clientr.player.stats.maxhp,18);
  
findimg(802).zoom .5;
    if(
clientr.player.stats.curhp 1) {
      
hideimg(802);
    }
  
setTimer(.05);
}

SCRIPTEND 
Thanks in advance,
-Ohk4y
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.