MODULE: Shifting Color

Started by Akumayo, Fri 30/12/2005 05:35:21

Previous topic - Next topic

Akumayo

'lo again.Ã,  Here's my newest module.Ã,  Some may find it useless, but I can think of a good many things it would be good for.Ã,  Basically, when called in a repeatedly_execute script, the function in this module slightly alters the color, shade, and lighting of the specified character, object, or region over and over.Ã,  Giving a "flowing color/light" effect.Ã,  It could be used to animate say... a magic orb, a glowing wall, a tank of unknown liquid, etc.
NOTE:Ã,  This module requires the Advanced Randoms Module to be imported and placed before this module in the module manager to function, as it calls two of the functions used in the Advanced Randoms Module.
Download the Advanced Randoms Module near the bottom of this post.

Here is a breakdown of the function:
Code: ags

WildColorGo(WhatToTint param, int tintedthingsidnumber);


WhatToTint controls what you're attempting a tint on, be it a character, object, or region.

tintedthingsidnumber is the ID number of the thing you're tinting.Ã,  This is easily called using commands such as player.ID.

Example of use:
Code: ags

function repeatedly_execute() 
Ã,  {
Ã,  Ã,  WildColorGo(TintCharacter, player.ID);
}


This will constantly update the player character's tint to a different color and shade, giving it a 'glowering' sort of look.
NOTE:Ã,  Objects and characters must have sprites that were imported FOR a depth above 256.Ã,  For example, using the default game and changing the color depth to 16-bit, then trying to run this function on ROGER, will do nothing, as ROGER has sprite's that cannot be properly tinted because of their depth.

THE SHIFTING COLOR MODULE IS DISTRIBUTED AS IS, WITH NO WARRENTY OF ANY KIND.Ã,  THE USER, UPON RECEIVING THE SHIFTING COLOR MODULE, MAY IMPLEMENT, REVERSE-ENGINEER, RE-DISTRIBUTE, COPY, AND OTHERWISE ALTER THE SOFTWARE AS THEY SEE FIT.

User Experience Recommended:
-Basic knowledge or understanding of the 'Tint' function

(I'm not a very good documenter, but you get the point, a credit would be nice if you use it, but that's all)

Downloads:

Please reply any bugs or suggestions regarding the module

-Regards, Akumayo
"Power is not a means - it is an end."

Rui 'Trovatore' Pires

Well, two suggestions would be a preview of what it does (in a GIF format, or as a small test game) and the inclusion on the Advanced Randoms module in the zip, if it's necessary.

I'll add it to my site, and if it's ok with you, I'll add the advanced randoms module myself.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Akumayo

#2
As per Rui's request, I added a download link that includes the Shifting Color Module, the Advanced Randoms Module, and a very small demo game.
"Power is not a means - it is an end."

Pumaman

Hehe, that generates quite a nice effect, good stuff :)

Candle

What a bitching Module.
I have an object that is kind of dark how would I make it be lighter when the Module runs or can that be done?

Akumayo

My my, it's been a long while since I've looked at this one...

Try openening the module's main script, and replacing line 6:
Code: ags

int wild_luminance = 50;


With this instead:
Code: ags

int wild_luminance = 100;


I think that should start the object at its normal brightness, rather than automatically darkening it.  It will still darken as the module runs, but it should at least START as its normal color.  I don't think you can lighten it up though, with this module.

Quote
What a bitching Module.
Thank you?

-Regards, Akumayo
"Power is not a means - it is an end."

Candle

Oh ya that work a lot better , I had cut out the tank and added it as an object then did the Mod on it and man it looks so cool when it flashs ,
Image for you to see what I'm talking about.

Akumayo

Wow!  Thanks for the kind words about the effects!  I'm glad the module has found a use for someone!  I wish you good luck with your game (looks kinda' creepy).

-Regards, Akumayo
"Power is not a means - it is an end."

Candle

It is and man you make the best Mods.. Let me know when you have something new:)

Akumayo

"Power is not a means - it is an end."

Candle

You think it is able to do hotspots too?
Would save a lot of time if you could cover an area with a hotspot and have it work.

Akumayo

I don't think so, the module takes advantage of AGS's ability to tint things, and it doesn't tint hotspots.  Perhaps you should try using regions instead?
"Power is not a means - it is an end."

Meystari F

I can not play the demo because my Windows Vista don't play games in 320x200 and 320x240 any longer. So perhaps if you could include Winsetup with the demo I can change the game in 640x400 and above.

Gilbert

You don't really need the setup executable to set up an AGS game, though yes, it's a good habit to include it to avoid confusions.

Monsieur OUXX

#14
I just to complain about the demo game, which is ugly and doesn't really give an idea of what the module is for (Why didn't you use your idea of a glowing orb, instead of putting a giant-pixellated-midly-glowing insect ???:D

but the module is really cool !
 

SMF spam blocked by CleanTalk