Center text

Get help using Construct 2

Post » Tue Jan 17, 2012 2:08 am

Hello everyone i'm new here and i must say that the software, website, everything is very well done! congratulation!

I did the first tutorial and now i want to add stuff to it so i can get better without having to worry too much about the design. I want that when i die a GAME OVER text pop in the middle of the screen. Right now im able to make the game over text pop when i get hit by a monster but i dont know how to make the text 'game over' appear in the middle of the screen. Right now i have static position for the text (middle of the whole stage) but if i die in the top corner for exemple, it wont show up because im too far away. Any idea how to fix that?

Thank you everyone i will have MANY other questions so stay tuned!
B
6
G
1
Posts: 44
Reputation: 1,220

Post » Tue Jan 17, 2012 2:40 am

As depicted in the HUD part of the beginner's guide, place your text on a layer which has 0,0 parralax.

On start of layout, set text position to windowwidth /2 for the x component and windowheight/2 for the y component.
It should be in the middle of your window, wherever the scrolling is in the layout.Kyatric2012-01-17 04:52:13
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Tue Jan 17, 2012 2:58 am

i want the exact opposite. i want the game over sign to appear in the middle of the display whereever i die in the level.
B
6
G
1
Posts: 44
Reputation: 1,220

Post » Tue Jan 17, 2012 4:51 am

Then don't place the text on the HUD layer and use layoutwidth/2 and layoutheight/2 instead of windowwidth/2 and windowheight/2 to position it.

This doesn't make much sense to me though, but it's your game.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Tue Jan 17, 2012 5:04 am

both of the solution dont work :S

i dont know if im doing it wrong but here is how i do it.

Player die only when he gets hit by monster.

so i do it like that: monster get into collision with player / system creat object / text 'game over' X: windowwidth/2 Y: windowheight/2

what am i doing wrong?
B
6
G
1
Posts: 44
Reputation: 1,220

Post » Tue Jan 17, 2012 5:07 am

send the capx we are running in circle (:
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue Jan 17, 2012 5:23 am

http://www.box.com/files#/files/0/f/0/1/f_1449018322
B
6
G
1
Posts: 44
Reputation: 1,220

Post » Tue Jan 17, 2012 5:24 am

http://www.box.com/s/knratul6zjo1yz84b1h2
B
6
G
1
Posts: 44
Reputation: 1,220

Post » Tue Jan 17, 2012 6:53 am

capx... not caproj
save your file as single file
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue Jan 17, 2012 7:53 am

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Next

Return to How do I....?

Who is online

Users browsing this forum: Radulepy and 5 guests