View Single Post
  #7  
Old 08-14-2014, 02:18 AM
Blah64 Blah64 is offline
Registered User
Blah64's Avatar
Join Date: Oct 2012
Posts: 20
Blah64 is on a distinguished road
I believe, sending params to the script is done:

player.attr[1] = "name.gani,param1,param2,param3,etc.";

then they are set as the params for onPlayerEnters() in the gani script.

As for 'player position', I don't think it actually sets the player's gani when you set the attr, you need to do setani() for that still. I might be wrong, but I think it just sets the script part of the gani, so you don't have to worry about it looking like multiple ganis.

example:

NPC Code:
onActionProjectile()
{
player.attr[2] = "";
player.attr[2] = "display_hp.gani";
scheduleevent(2,"reset",null);
}

onReset()
{
player.attr[2] = "";
}




Note: I usually clear the attr to "" whenever I set the gani script because I remember there were issues with the script not updating if it was already running when you decide to set it again.
Reply With Quote