![]() |
Gralats
HTML Code:
function onCreated() |
I never understood how Gani params work and still don't, explain.
|
Quote:
Basically, treat the gani as an array. [Each param to that ''array'' is classed as the frame] |
...What?
|
ganiName[1] = frame 1 of the ganiName gani
walk[0] = frame 0 of the walk gani. Easier? :p |
Kind of, I've already tried to learn. I've noticed that with gani params on the sprites inside of the gani it has a (#). Is that needed?
No idea if I explained that correctly |
setAni( "GANINAME", PARAM1, PARAM2, PARAM3, [...] );
that explain? In the gani script, use if (created) and then params[0], etc. You have to use if (created) because onCreated as a function erases those params. To access the params in the gani, use PARAM1, PARAM2, PARAM3, PARAM4 for example, you could make a gani of a 32x32 image you want to drop for example, do this: setCharAni( "dropitem", "block.png" ); than instead of in the gani putting an image when you add a sprite, put PARAM1. |
Wait wait wait, What?
So basically I could use that for equipping things to my player like if I had custom bodies? Like I could use that to set the images or something? Example: PHP Code:
|
Quote:
|
Ho ho! I'm about to have a field day, I was planning on doing something similar to that but didn't know how! For loops will do just fine. =D
|
You're passing parameters to the GANI. Inside the gani, either through graalshop or notepad, you can access those parameters.
Like in Chandler's script he is passing the numbers 0-4, for each type of gralat. In the gani, the sprite being displayed is the number of the parameter. So if it's a green gralat, the number 0 is being passed as the parameter, and sprite 0 is being displayed. It's best to look at the gani's as well, so you can understand what they're being used for. |
The sprite should be PARAM1.
then do setAni( "ANINAME", "swordimage.png" ); then if all your swords use the same template, it's a hell of a lot less ganis. |
Yeah I get it now.
|
whats this do?
and whats it for? |
The gralat class re-scripted.
|
All times are GMT +2. The time now is 10:40 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.