Thread: Ganis
View Single Post
  #1  
Old 04-16-2007, 09:01 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Ganis

Well, I don't really know where this should go... so I decided in my favourite forum!

Well, my idea is to create a lamp, but edit the light effects. You'll see from the script[s].

The gani:

HTML Code:
GANI0001
SPRITE    0 v_object-lamp.png    0    0   32   64 Lamp
SPRITE    1           ATTR1    0    0  130  130 Light

SINGLEDIRECTION
DEFAULTATTR1 light4.png
DEFAULTATTR2 0.5, 0.5, 0.5, 0.5
DEFAULTHEAD head19.png
DEFAULTBODY body.png

ANI
   0   8 -26,    1 -39 -81
ANIEND
As you can see, it's setting a Light image, which works. What I am wanting to do is edit the colors to this sprite [1], but I don't want to use a gani script. I'd use it, if it were the only way though I suppose...

He's my lamp script:

HTML Code:
function onCreated()
{
  this.showCharacter();
  this.ani = "v_lamp";
  
  if (this.alignLamp)
  {
    this.x -= 0.5;
    this.y += 0.5;
  }
  this.attr[1] = this.lightImage;
  this.attr[2] = this.lightColors;
}
The ATTR2 shall contain the lights effects {r,g,b,a}. Any suggestions? thanks!
Reply With Quote