Graal Forums  

Go Back   Graal Forums > Development Forums > Gani Construction
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-01-2008, 04:33 AM
atomuskus atomuskus is offline
Feelin' ***tastic
Join Date: May 2007
Posts: 23
atomuskus is on a distinguished road
attatching scripted light effects

Is there a way to attach a scripted light effect that uses the showing command to a specific sprite? (I use showing because that seems teh easiest to creating such as trails with)
Reply With Quote
  #2  
Old 07-18-2008, 10:05 PM
Frankie Frankie is offline
xChugxLifex
Frankie's Avatar
Join Date: Feb 2008
Location: New York
Posts: 1,610
Frankie is a jewel in the roughFrankie is a jewel in the rough
Send a message via AIM to Frankie Send a message via MSN to Frankie
you can just add the light effect as a sprite, put it in the gani, then open the gani in a text file and put in changeimgcolors index red green blue alpha.
__________________
*Sum41Freeeeek
*Frankie
Reply With Quote
  #3  
Old 07-18-2008, 10:09 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Or you can open the gani with a text editor, jump to the end, add a line:
SCRIPT
followed by your script (always clientside, no //#CLIENTSIDE needed, can be GS2 too), and when you are done, one last line:
SCRIPTEND
Save, upload, and enjoy.
__________________
Reply With Quote
  #4  
Old 07-22-2008, 04:47 PM
Seich Seich is offline
Noctorious' NeoHunter
Seich's Avatar
Join Date: Jun 2008
Location: Honduras
Posts: 193
Seich will become famous soon enough
Send a message via MSN to Seich Send a message via Yahoo to Seich
Since I don't know, what's your scripting or general dev level i will post another reply since both Frankie's and Crow's answers are pretty accurate but i don't think someone with few experience will be able to figure it out what they are trying to say.so i will make a detail guide here.

to add a scripted light effect you have to follow this steps:

First, you make your gani as simple and normal gani and use a light sprite definition(the black and white light) wherever you want it to appear

Then, when done with the general appearance of your gani and with the light def. in place save the gani and close graal shop.

Afterward, open your recently made gani using any notepad(right click on it and press open with... notepad)

you will have something like this:

this is from a gun with a laser i made:
PHP Code:
SPRITE    3 tl_laserpointer2.gif    0    0  182   20 sprite
SPRITE    4 tl_laserpointer2
.gif    5   20  182   20 sprite
SPRITE    5            BODY  120  398    8    8 sprite
SPRITE    6            BODY   32  398    8    8 sprite
SPRITE    7            BODY   68  344    8    8 sprite
SPRITE   10          SHIELD    0    0    6   18 shield up
SPRITE   11          SHIELD    6    0    8   20 shield left
SPRITE   12          SHIELD   14    0   16   20 shield down
SPRITE   13          SHIELD   30    0    8   20 shield right
SPRITE   14 tl_sal
-creeper.gif   14    4   26   17 tl_sal-creeper
SPRITE   15 tl_sal
-creeper.gif   15   41   28   18 tl_sal-creeper
SPRITE   16 tl_sal
-creeper.gif    0   21   42   20 tl_sal-creeper
SPRITE   17 tl_sal
-creeper.gif   32   58    7   10 tl_sal-creeper
SPRITE   18 tl_sal
-creeper.gif   50   58    6   10 tl_sal-creeper
SPRITE   19 tl_sal
-creeper.gif   49    4   27   17 tl_sal-creeper 
then go to the end of the paper and look for this:
PHP Code:
SETBACKTO tl_ceo-laserhg-idle
DEFAULTATTR1 hat0
.png
DEFAULTATTR2 TakeOmni007
DEFAULTHEAD head19
.png
DEFAULTBODY body
.png 
right after it, you can add a space in between if you want, add this.
PHP Code:
COLOREFFECT 1 0.4 0.4 1 0.7
COLOREFFECT 2 0.4 0.4 1 0.7
COLOREFFECT 3 0.4 0.4 1 0.7
COLOREFFECT 4 0.4 0.4 1 0.7 
this works like this:

COLOREFFECT <sprite index> <red color effect> <green color effect> <blue color effect>

you can add multiple lines to define different color effect to many sprites.
in my case i wanted all laser sides to be slightly blueish

after that add this script this is in my case but you can modify it to fit your gani, make sure to remove comments as they might cause problems.
PHP Code:
SCRIPT
if (created){
    
drawwaslight;//draw as a light
    
changeimgvis 1,3;//change the image visibility of sprites with index 1,2,3,4
    
changeimgvis 2,3;
    
changeimgvis 3,3;
    
changeimgvis 4,3;    
}
SCRIPTEND 
Okay, you can save it know and when you open it on the game you should see your color effect...

hopes this helps you.
Reply With Quote
Reply

Tags
tom cruise

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:39 PM.


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