The Daily Click ::. Forums ::. Klik Coding Help ::. Effect to fill an object with colour - help?
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
13th September, 2009 at 16:57:49 -

Hi thar,

Just wondering what the best way to go about gradually adding water to a bottle in MMF2 would be. To be more specific, I'm trying to have an object gradually fill up with colour, one row at a time over a duration. The only thing I can think of is to have a separate animation for this one frame at a time, and I'm pretty sure that IS the only way, however... Can you guys think of something similar to this that could look nice?

Feel free to throw in any suggestions, as wild as they may be.

 
Image

Tell 'em Babs is 'ere...

DMT



Registered
  18/06/2009
Points
  150
13th September, 2009 at 17:21:50 -

Overlay Redux can make all your dreams come true.

 
I am no longer not a taco.

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
13th September, 2009 at 19:49:51 -

Ah, thanks for the reply - I'll look into that now

Also, SORRY for posting in the wrong section - Code-it board used to be at the top ;_;

Edit: ok, what is Overlay Redux and where can I find it exactly? ^^;;

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
13th September, 2009 at 20:32:18 -

http://ext.neatwares.ath.cx/ext/Overlay_Redux_Object Here ya go

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
14th September, 2009 at 18:12:07 -

Thanks guys! (word word)

 
Image

Tell 'em Babs is 'ere...

MrMcFlurry



Registered
  03/08/2009
Points
  89

360 Owner
14th September, 2009 at 21:15:37 -

there's a simpler way if you use mmf2.

make a blue active object which is 1 pixel high and the width of your bottle. Then simply change the object's y scale to how many pixels high you want it to be.

 
n/a

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
14th September, 2009 at 21:23:03 -

Unless the bottleneck gets narrow, thus making an idea like that (or using a vertical bar counter like I would have suggested) not so useful.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

MrMcFlurry



Registered
  03/08/2009
Points
  89

360 Owner
15th September, 2009 at 01:09:05 -

This is true, though simpler does usually come with a price. mind if the bottle were part of a UI which masks around the bottle, simply using semi transparency on the UI and having the liquid behind the bottle (the ui hiding the excess liquid) would work well enough.

But yeah, a vertical counter would work just as well.

though,there would be another simple solution if you did have a masked UI, you just have a color block which moves up and down x pixels according to the filled value.

Overlay object would of course be the most dynamic way to do it, but could be a needlessly complex answer to somebody who hasn't touched it.I was just throwing alternatives out there

 
n/a

DMT



Registered
  18/06/2009
Points
  150
15th September, 2009 at 01:33:39 -

What about Interface Bar? I just found that cool extension.

 
I am no longer not a taco.

MBK



Registered
  07/06/2007
Points
  1578

VIP Member
19th September, 2009 at 06:28:38 -

Filling a bottle with water could also be done with some creative coding, but it is a bit much for something so simple.


 
Click Me! http://www.create-games.com/project.asp?view=main&id=1444

http://www.mediafire.com/download.php?aoo1dnnlq5i

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

aphant



Registered
  18/05/2008
Points
  1242
19th September, 2009 at 10:57:52 -

Simplest way:
Counter object, display type set to Animation. One frame, as you originally suggested.


Another simple way:
Active object, using simple code to mimic the previous counter suggestion.

 

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
19th September, 2009 at 13:22:54 -

You could use an actives animation directions, then you'd have a 32 frame fill-up. Just have the same image in each direction and remove a line of pixels for each direction, then simply use a "set direction to counter" type of code. If you need more frames for the fill-up you could just use another animation for it. Or something like that.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

MrMcFlurry



Registered
  03/08/2009
Points
  89

360 Owner
19th September, 2009 at 22:22:16 -

that's a bit...needless EE, if using an active you just make 1 animation with however many frames you wanted, and use the set frame action. Though if doing it by animating it frame by frame, a counter would be easier

 
n/a

Rox Flame

Creative Talentician

Registered
  06/10/2004
Points
  383
19th September, 2009 at 23:53:12 -

Id definately go with interface bar. All you need is an image of empty bottle and an image of a full bottle and the value of the inbuilt counter will slice the full bottle image based on the percentage, showing the empty bottle image behind.

example...
http://www.roxflame.com/downloads/bottle.zip

Edited by Rox Flame

 
Current project:
Dynabrick (%70)

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
20th September, 2009 at 12:53:47 -


Originally Posted by MrMcFlurry
that's a bit...needless EE, if using an active you just make 1 animation with however many frames you wanted, and use the set frame action. Though if doing it by animating it frame by frame, a counter would be easier



My bad, I forget most people use MMF2, my technique only applies to MMF1.2, which I'm using(!).

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

MrMcFlurry



Registered
  03/08/2009
Points
  89

360 Owner
20th September, 2009 at 17:27:50 -

I'm pretty sure MMF can set frame too EE In fact i think I have memory of Games factory having set frame, let alone MMF.

But anyway, I've not used interface before, but by the sound of it Roxy, that sounds like it' be a simple an effective solution.

 
n/a

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
20th September, 2009 at 19:58:25 -


Originally Posted by MrMcFlurry
I'm pretty sure MMF can set frame too EE In fact i think I have memory of Games factory having set frame, let alone MMF.



No I'm quite sure you can't, don't know about MMF1.5 though.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

MrMcFlurry



Registered
  03/08/2009
Points
  89

360 Owner
21st September, 2009 at 18:41:18 -


Originally Posted by Eternal Man [EE]

Originally Posted by MrMcFlurry
I'm pretty sure MMF can set frame too EE In fact i think I have memory of Games factory having set frame, let alone MMF.



No I'm quite sure you can't, don't know about MMF1.5 though.



Well I'm honestly surprised...coulda sworn I'd used it but I'll take your word, maybe ive had mmf2 longer than i remember and am getting confused

 
n/a
   

Post Reply



 



Advertisement

Worth A Click