How do I move a ProgressBar to another layer via Event Sheet

Get help using Construct 2

Post » Sun Jul 02, 2017 3:23 pm

How do I move a ProgressBar/Button or other components which doesn't have this "Move to Layer" option to another layer via Event Sheet?

I could easily do it then I'm on a scene editing, but how can I do it via an Event?

This "Layer" property is in a common property group but i can't find the way operate it via scripting...

Could anybody help me with this?
B
5
Posts: 12
Reputation: 235

Post » Sun Jul 02, 2017 4:56 pm

Hi,

I do not fully understand but you can create your HUD in a separate layout with layer HUD (make sure no other layer has this name) and make that layer a GLOBAL layer. This way it will be included in all layouts and so you don't need to create it in every layout.
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.

My games & gaming portal = DolyGames

If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.

Cheers,

COSMOS
B
20
S
9
G
1
Posts: 75
Reputation: 2,152

Post » Sun Jul 02, 2017 5:03 pm

Thanks, this info is also useful for me, but this is not exactly that I was asking for.

I mean, that I can't find the way to change the Initial Layer of an object such as ProgressBar via an Event Sheet.
For example for a sprite object, we could do it via Action: OurSprite : Move to layer ; new layer
But for ProgressBar there is no such an option like for Sprite.

If for example i want to hide a progressBar by moving it for a specific layer together with the sprite it is attached to, what should I do in that case?
B
5
Posts: 12
Reputation: 235

Post » Sun Jul 02, 2017 9:03 pm

Hi,

I usually create my own progress bars simply with any rectangle and regulating width or height, so i never had that problem. Maybe someone else can comment for that.

But if you want to hide it, you can always put another sprite on top of it i guess or simply move it to X = -200 or something (out of the screen) and then move it back into the screen when you need.

Cheers,
COSMOS
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.

My games & gaming portal = DolyGames

If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.

Cheers,

COSMOS
B
20
S
9
G
1
Posts: 75
Reputation: 2,152

Post » Sun Jul 02, 2017 9:39 pm

It is a Form Element, it its not 'on a layer somewhere in the canvas'. It is a 'form on top of the canvas'.
You want it into the canvas, then you got to make one out of sprites.
Use a Tiled Background for the bar, easier.

Plz check the manual for it.
B
33
S
18
G
28
Posts: 2,474
Reputation: 20,912

Post » Sun Jul 02, 2017 9:52 pm

Thank you for your replies. You helped me to settle down with this.
B
5
Posts: 12
Reputation: 235


Return to How do I....?

Who is online

Users browsing this forum: alextro, stevenode and 6 guests