Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Passing params to attached ganis (https://forums.graalonline.com/forums/showthread.php?t=66335)

Yen 05-30-2006 09:44 PM

Passing params to attached ganis
 
I think I already asked about this, but I'm not sure:
I'm attaching a gani to the player via attr[].
I want to be able to send a parameter with the gani.
Is there any way to do this?

In GS1, I would just do something like 'setplayerprop #P2,blah.gani,3;'
It doesn't work on GS2/v4.

Skyld 05-30-2006 09:48 PM

attr[index] = {"ganiname", "params"};

Yen 05-30-2006 09:49 PM

player.attr[7] = {"yen-effect-copytrail.gani",3};

Nothing is showing, at all.

Bl0nkt 05-30-2006 11:59 PM

Is your param 3?

NPC Code:
player.attr[7] = {"yen_effect_copytrail", "param1", "param2", "param3", "param4", etc};


ApothiX 05-31-2006 02:47 AM

Is this actually displaying the gani? Instead of using showani? or are you parsing this somewhere?

Skyld 05-31-2006 12:52 PM

Quote:

Originally Posted by Yen
player.attr[7] = {"yen-effect-copytrail.gani",3};

Nothing is showing, at all.

You don't need the .gani there.

player.attr[7] = {"yen-effect-copytrail", 3};

Yen 06-19-2006 09:23 PM

Quote:

Originally Posted by Skyld
You don't need the .gani there.

player.attr[7] = {"yen-effect-copytrail", 3};

It doesn't work, period; with or without the .gani extension.
If I try to set it to an array like that, it simply doesn't change.

contiga 06-20-2006 10:17 PM

Put a sleep( 0.05); in the gani script, before you load params[ index] and it should work.

Yen 06-20-2006 11:03 PM

It doesn't work, period; with or without the .gani extension.
If I try to set it to an array like that, the player's attr[] simply doesn't change.

contiga 06-21-2006 10:25 AM

Quote:

Originally Posted by Yen
It doesn't work, period; with or without the .gani extension.
If I try to set it to an array like that, the player's attr[] simply doesn't change.


Maybe in this case you must do: player.attr[ 7] = "gani",3;
Because in findImg( index).ani = lala; you must also do it that way.

ApothiX 06-21-2006 01:59 PM

Quote:

Originally Posted by contiga
Maybe in this case you must do: player.attr[ 7] = "gani",3;
Because in findImg( index).ani = lala; you must also do it that way.

That _SHOULD_ produce a syntax error. But it probably won't because it will use oldstrings and such. If you're going to do something like that, the correct syntax is either:

player.attr[7] = { "gani", 3 };
or
player.attr[7] = "\"gani\",3";


All times are GMT +2. The time now is 05:08 AM.

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