Counter Objects

New releases and general discussions.

Post » Sat Mar 21, 2009 9:08 pm

I'd like to have an object similar to the counter object from the Clcikteam products. You can make it a horizontal bar, a vertical bar, or a number counter, or a picture counter. For bars you can make them solid colors or gradients. For numbers you can set the font, font size, and font color or edit the individual number animation frames. This would save soooooooooooooo much time for making HUDs.
B
1
G
3
Posts: 3
Reputation: 831

Post » Sat Mar 21, 2009 9:26 pm

You can make them with existing objects and a private variable that you change depending on circumstances (such as health). Text object to display number, sprite (with different animations) to display a changeable sprite or tiled background to display a bar etc.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sat Mar 21, 2009 11:38 pm

[quote="PublicNMEno1":2zqgcr51]This would save soooooooooooooo much time for making HUDs.[/quote:2zqgcr51]

Not really :/

The Counter object in MMF is basically a text object with a private variable to store the amount. It's just as fast and easy to set up a custom one in Construct.

Plus the Counter object has a much more limited use than the text object... why make a more limited version of a more advanced object? As an analogy, that's like saying "I want a simpler spite object for when I don't need animation." Well, that's easy... just make a single-frame sprite with no animation.

And if you wanted a health bar instead of text, that's just as easy to set up. Make a Tiled Background, or a Gradient, or a Box, whatever you want, and use a private variable for the health amount. The code to control the size would be something like "Always -> Set width to (health * barIncrement)"

For a picture (like hearts in Zelda) you just make your Tiled Background a heart (say, 32x32 px). Then the code to control it is "Always -> set width to (health * 32)"

Easy.

We get a lot of MMF users asking about Counter objects. They're just so used to having to use them in MMF they don't see that Counter objects are completely unnecessary.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Mar 22, 2009 1:11 am

Thanks deadeye & mipey. I was not aware of that. :mrgreen:
B
1
G
3
Posts: 3
Reputation: 831

Post » Sun Mar 22, 2009 1:16 am

yea counter objects are really unnessesary. Plus, having them would ruin swimbas fun. We would'nt want that to happen now, would we? :o
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Mon Mar 23, 2009 10:51 pm

Yeah, but what if someone uses special text? Like Bitmap fonts.
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Tue Mar 24, 2009 3:07 am

That would require the equivalent of a Text Blitter object... which Construct doesn't have. Yet.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Mar 24, 2009 3:36 am

Yeah, the only advantage of Clickteam's counter object is that it uses sprite frames for custom number images. That is one feature I would love to see in Construct, because my current fan game project that is being converted from MMF 2 requires this. But yes, a text blitter object would solve this problem.
B
2
G
5
Posts: 14
Reputation: 1,278


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests