Putting a script into a gani

Um… I think this would be placed in NPC. Anyways, is it possible to place a script into a gani? Like say I would want to make an image in a gani have a color effect like this.

if (created || playerenters) {
setcoloreffect 1,1,1,.80;
}

How would I put that into a gani image?

Its possible to place scripts into gani’s. But not by graal itself.
You have to place that into the script which you use to ‘use / play’ the gani

If you want a specific sprite in a gani you could just do

COLOREFFECT INDEX R G B A

In the portion under ‘DEFAULTHEAD’
(Note, the sprite needs to have a “fixed image”, ‘ATTR1’, ‘HEAD’, ‘BODY’, ‘SPRITES’ are not fixed images.)

However if you want scripting in a gani, Between the DEFAULTHEAD and the section for the frame data.

SCRIPT
if(playerenters){
Stuff
}
SCRIPTEND

Be warned ganiscript can lag a frame behind, it’s run priority is sandwiched between Built-In and Weapons / LevelNPCs. As well as the gani script doesn’t activate till a frame later after the gani is set.

P.S: You’ll want to use notepad for this either way.

Ok, so I’m trying to make a spell gani, and I’m using ATTR 2 and ATTR 3, would it work for those?

…NO.

Ok, so I’d have to use direct images? If so, it’s not a problem. Also, what do you mean about using notepad, would I have to call on the notepad script for the gani effect?

Here’s the image with the script I want to add the coloreffect to.

// NPC made by Kondie
if (created || playerenters) {
toweapons spell test;
}
if (weaponfired){
if (this.spell=0){
this.spell=1;
freezeplayer 1;
setani casting_spelltest.gani,;
sleep 1;
this.spell=0;
}
else {
this.spell=0;
replaceani sword,sword;
replaceani idle,idle;
replaceani walk,walk;
}
}

Um, I would upload the gani too, but I don’t know how.

Look in your gani folder and open some of Beholder’s ganis from Gravity Bomb or something; they’ll have some examples of ganiscripts.

___Merged doublepost__________________

And yes, you can use params and attrs in ganiscripts.

Can somebody please provide me with some sort of example? I’m sorry for being a newb about this, but I can’t seem to get it.

Here’s what I mean. I know how to make a script, I’m not that stupid, I just don’t know how to add it to the gani. I’ve been looking in the gani section, and I can’t find out how to make the script apply to the image in the gani! I just need to add an alpha of 0.8 to the script x____x like this

SCRIPT if (created || playerenters) { coloreffect 21,0,0,0,0.5; //21 Is the sprites index so I hope I'm correct with the scripts color effect } SCRIPTEND

I can’t find out how to make that apply to the sprite!
I looked at these posts, but still couldn’t figure it out.

http://forums.graal.in/forums/showthread.php?t=3438

http://forums.graal.in/forums/showthread.php?t=1475

http://forums.graal.in/forums/showthread.php?t=2832

The attachments below are the Gani I made, and the images I have. Hopefully someone can provide me with a nice explanation that even a newb like me could understand.

o___O Kondie’s not being an annoying iNoob anymore, and is making decent help threads.

Well, I finally found the advanced options button… >_<

[QUOTE=Spooon;51491]
o___O Kondie’s not being an annoying iNoob anymore, and is making decent help threads.


[/QUOTE]

Personally, I found that Kondie was always willing to do what he needed to achieve quality on his server. But clearly he made a flaw (What the fuck is Tricxta doing on his server?) ;3

im just chilling there, you know… hanging about, that ok with you yen?

Lol, maybe you can help me with putting a script into a gani Tricxta.

Fine Kondie, I’m sure you know the risks of having him on your server. (They all learn sooner or later)

YES i eat your server up :eek:

NO NOT MY SERVER!! (Dives in front and gets eaten)

What the hell is all this crap about Tricxta killing servers? I’ve killed so many servers that if Tricxta were compared to me he’d be an unborn fetus.

I think he is an unborn fetus.
FETUS REPEATUS!!!

unborn fetuses are rather incapable…

xD I think this thread is all bullshit now. :stuck_out_tongue: