Stays on screen?

Get help using Construct 2

Post » Sat Mar 30, 2013 2:16 am

How do i make something stay on screen without a movement behavior, like in the corner.
B
4
Posts: 2
Reputation: 333

Post » Sat Mar 30, 2013 2:41 am

I believe there is a behavior that does that, but if not, just put it on a new layer, and in that layer, in the properties, set the paralaxing to 0,0
B
10
S
3
G
3
Posts: 234
Reputation: 3,467

Post » Sat Mar 30, 2013 5:30 am

There are no behaviors for HUDs. But yes, the new layer must be above your main layer, its parallax set to 0.
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,362

Post » Sat Mar 30, 2013 8:56 am

@fassFlash, there is a behaviour designed for HUDs, it's called Anchor. Personally, I've never really found it to be of much use when one can just use parallax, but it might be suited for particular applications - especially those that use multiple screen sizes and aspect ratios.
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Sat Mar 30, 2013 3:49 pm

Why don't you use Anchor? I never used it and the parallax HUD seems simple to me, so is it harder to use Anchor?
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,362

Post » Sat Mar 30, 2013 4:02 pm

@GeometriX, @fassFlash

Anchor is not meant to be an alternative to parallaxing. It's for supporting multiple screensizes, to ensure your objects are positioned at the right place regardless of screensize. Read the manual entry for more info.

[quote=Manual]Objects using the Anchor behavior should also be played on a layer with its parallax set to 0, 0. Otherwise as the game scrolls the objects may "lag" behind the screen.[/quote]
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sat Mar 30, 2013 4:04 pm

@fassFlash It's... different. I say that I've never found a use for it because I've never actually had to use it. It seems to be designed for use on objects when your fullscreen mode is set to scale (just ordinary scale) and/or if you plan on supporting multiple screen sizes and aspect ratios. There it can be used to stretch UI elements to fill the correct width and/or height on your screen or hold them in place.

Here's a quick example of using anchored text and a 9patch object.
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Thu Apr 04, 2013 3:34 pm

Thanks all of you!
B
4
Posts: 2
Reputation: 333


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests