Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-01-2010, 11:49 PM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
gui displays with ganis and particles effects with imgs

is it possible to have ganis and particles to display health and other things then just a basic img like example hearts the can spin around when u lost health red particles effect when u gain a heart its blue ect just a example
Reply With Quote
  #2  
Old 06-01-2010, 11:50 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Yes, look into GANI scripts. There are some posts about it here.
__________________
Reply With Quote
  #3  
Old 06-02-2010, 05:42 AM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
where? i dont c no link
Reply With Quote
  #4  
Old 06-02-2010, 05:54 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Rave_J View Post
where? i dont c no link
Search.
__________________
Quote:
Reply With Quote
  #5  
Old 06-02-2010, 11:06 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by cbk1994 View Post
All you do is make a text file and save it with a .gani extension. In the text file, it should look like this:

PHP Code:
SCRIPT
function onCreated()
{
  
doBlah();
}
SCRIPTEND 
It is just like any other script, but it is clientside. There is no need to have //#CLIENTSIDE, as it is always clientside.

You also cant use triggerserver to trigger the GANI to perform serverside functions.
You will want to put the variables (health, etc) that you want access to into player attributes (read this thread). Then, you can display them however you want.

PHP Code:
function onCreated() {
  
this.trigger("timeout"null);
}

function 
onPlayerEnters() {
  
this.trigger("created"null);
}

function 
onTimeOut() {
  
with (findimg(200)) {
    
image "myhealthbar.png";
    
    
player.1;
    
player.3;
    
    
attachtoowner true// follow player
    
temp.shouldBe = (50/100) * player.attr[5];
    
    if (
partW shouldBe) {
      
partW ++;
    } else if (
partW shouldBe) {
      
partW --;
    }
  }
  
this.setTimer(0.05);

This is a simple example of how you could make a health bar that "slides" from one HP to another instead of jumping (width decreases over time instead of immediately). You can also add particle effects or whatever in another showimg.
__________________
Reply With Quote
  #6  
Old 06-02-2010, 04:26 PM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
ty chris rep++
Reply With Quote
Reply


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 09:34 AM.


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