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 04-24-2007, 08:18 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Exactly what is...

A gani script? Where does it go? What does it do? Does it have any special things I should know about?
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #2  
Old 04-24-2007, 10:03 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
It's in the ganis In a SCRIPT SCRIPTEND block
In GS1 it is limited in functionality (since it can be edited), in GS2 it is compiled on the server and can do everything that other client scripts can do as well.

You can either use it in a gani with setani/this.ani, or you "attach" it to a player or npc by doing object.attr[index] = "mygani.gani";

One thing that is special is that you can access the object to which the gani belongs / is attached to by "player". Also onPlayerEnters() receives the gani parameters (setani("aniname",param1,param2,...)) as function parameters.
Reply With Quote
  #3  
Old 04-24-2007, 09:22 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by killerogue View Post
A gani script? Where does it go? What does it do? Does it have any special things I should know about?
It obiviously goes inside a gani <_<.

Example

PHP Code:
player.attr[10] = "hp.gani";
player.attr[11] = {hpflagmaxhpflag}; 
PHP Code:
SCRIPT
function onCreated() onTimeout();
function 
onPlayerEnters() onTimeout();

function 
onTimeout()
{
  
showtext10, (player.6), (player.3), "Arial""b"format("HP:%f/%i"player.attr[11][0], player.attr[11][1]);
  
changeimgvis(102);
  
changeimgzoom(100.50);

  
setTimer(.05);
}
SCRIPTEND 
From what I hear its much better to use GANI scripting gives off less lag then other types of scripting

Last edited by Rapidwolve; 04-24-2007 at 10:35 PM..
Reply With Quote
  #4  
Old 04-24-2007, 09:54 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Rapidwolve View Post
From what I hear its much better to use GANI scripting for certain types of script as
as...?

Pretty much, GANI scripts are good when you want to display something about the player to all other players but clientside.

Since the GANI is displayed to everyone, they all see the same clientside effects when they are in a GANI script. If you've ever been on Era and seen those floating text messages saying "-5" or "Dead" or whatever, those are a GANI script.
__________________
Skyld
Reply With Quote
  #5  
Old 04-24-2007, 10:35 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by Skyld View Post
as...?

Pretty much, GANI scripts are good when you want to display something about the player to all other players but clientside.

Since the GANI is displayed to everyone, they all see the same clientside effects when they are in a GANI script. If you've ever been on Era and seen those floating text messages saying "-5" or "Dead" or whatever, those are a GANI script.
Sorry fixed and reworded
Reply With Quote
  #6  
Old 04-24-2007, 11:27 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Gani scripts are awesome
They can be a pain though especially when it comes to sending params to it (was alot easier in GS1) when it is attached to an object using obj.attr[i] = "file.gani"
Most people get around this buy just making the params into a string though and tokenizing the param when it gets to the gani.
__________________
Do it with a DON!
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 02:04 AM.


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