How to make a Mask?

Get help using Construct 2

Post » Wed Dec 21, 2011 8:58 am

Is there a possibility to mask a sprite?
Here is what I plan to do:
B
14
S
2
G
6
Posts: 110
Reputation: 3,849

Post » Wed Dec 21, 2011 9:13 am

Here, take a look at the health bar in my project.
Capx

I'll see if I can whip up a custom capx for you tomorrow, alright?
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
46
S
24
G
30
Posts: 514
Reputation: 19,433

Post » Wed Dec 21, 2011 10:56 am

Thank you. But this is just a bar. I made a health bar by my own.TastyBytes2011-12-21 10:56:29
B
14
S
2
G
6
Posts: 110
Reputation: 3,849

Post » Wed Dec 21, 2011 11:14 am

@TastyBytes: one solution I would use (not saying that's the best) :
Have the border/heart shape as a sprite on the top layer, and have the "fill" of the heart as tiled background which height you'd set according to your health value.

You might also want to check the "effects" property of the sprite/tiledbackground object, and see if tweaking with those values help you out.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
279
S
104
G
86
Posts: 7,313
Reputation: 84,331

Post » Wed Dec 21, 2011 11:21 am

Yeah. This is a good I idea. Thank you. I will try this!
B
14
S
2
G
6
Posts: 110
Reputation: 3,849

Post » Wed Dec 21, 2011 12:48 pm

Bytes, you don't understand what I'm trying to bring across. This health bar I cooked up for my game, with a little tinkering; the same mechanics can be used for a Zelda style health display.

In place of the frame, you just have the single hearts frame in place on the top gui layer. You place the red graphics (you'll probably have to have more than one of the red graphics, from full to completely empty) in the same x/y coordiates on a topmost layer (for gui, with 0,0 parallex) and with a little adjustment; you can get the health gui to change display without filling over or running into problems.LaDestitute2011-12-21 12:51:44
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
46
S
24
G
30
Posts: 514
Reputation: 19,433

Post » Wed Dec 21, 2011 1:50 pm

Ok, I see. But this is not exacly what i am searching for. Cause I have to do more grafics and the change of the bar isnt really dynamic.

you'll probably have to have more than one of the red graphics, from full to completely empty
B
14
S
2
G
6
Posts: 110
Reputation: 3,849

Post » Wed Dec 21, 2011 3:30 pm

@TastyBytes : here's one way to do it : http://dl.dropbox.com/u/1412774/HeartBar.capx. The online example : http://dl.dropbox.com/u/1412774/HeartBar/index.html
You can easily mod it.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Wed Dec 21, 2011 3:59 pm

@Pode: I am sorry, if I am to confusing.
I hope with this picture it beomes more clearly.



I have also tried the method with the tiled background, but you cant do the Hotspot to the bottom of it. Here is the Capx:
CAPX
B
14
S
2
G
6
Posts: 110
Reputation: 3,849

Post » Wed Dec 21, 2011 5:16 pm

heartHUD.capx
Comments in the capx
Last edited by Yann on Sun Sep 14, 2014 10:45 pm, edited 1 time in total.
B
64
S
22
G
14
Posts: 1,482
Reputation: 16,457

Next

Return to How do I....?

Who is online

Users browsing this forum: bambang150 and 1 guest