How to make flashing Chili objects

How to make flashing Chili objects

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

How to make flashing Chili objects

Post by Silentwings »

Split from viewtopic.php?f=14&t=33829
whole tech window flash but I didn't know how to code that easy and fast while using chili
I didn't look at the game (away from home and not able to atm), so maybe I'm about to answer the wrong question - but you can put a constant colour image as a Chili image in as the first child of the object and then (repeatedly) alter that images colour/transparency setting. Or, if your Chili theme has a background already for the object, a simple solution is to just keep changing Object.backgroundColor and Object.borderColor.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Ludum Dare 33

Post by gajop »

Silentwings wrote:I didn't look at the game (away from home and not able to atm), so maybe I'm about to answer the wrong question - but you can put a constant colour image as a Chili image in as the first child of the object and then (repeatedly) alter that images colour/transparency setting. Or, if your Chili theme has a background already for the object, a simple solution is to just keep changing Object.backgroundColor and Object.borderColor.
Oh, you can do that for images as well? I thought they used textures which ignored color settings.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Ludum Dare 33

Post by Silentwings »

Oh, you can do that for images as well?
Yep! All the unit pics in BAR, the colour is actually added by chili.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Ludum Dare 33

Post by gajop »

Silentwings wrote:
Oh, you can do that for images as well?
Yep! All the unit pics in BAR, the colour is actually added by chili.
Ah you're right. I think I tried .backgroundColor and didn't look further. It seems it's only multiplied with the texture though so you can't add colors (e.g. can't turn a blue image red), but you can still do a lot if the image is white.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Ludum Dare 33

Post by jK »

gajop wrote:Unlock available should just make the whole tech window flash but I didn't know how to code that easy and fast while using chili. (Probably would have to resort to default opengl and had no time for that)
There is an example in the demo widget.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Ludum Dare 33

Post by gajop »

jK wrote:
gajop wrote:Unlock available should just make the whole tech window flash but I didn't know how to code that easy and fast while using chili. (Probably would have to resort to default opengl and had no time for that)
There is an example in the demo widget.
Yep! I've been using that for buttons, text and similar for ages, I just didn't know there was the .color field for images.
I'm keep to restart work in chili fx for some sexier animated UI though -> shaders would probably be neat.
Post Reply

Return to “Game Development”