[Solved]How do I dock a sprite?

Get help using Construct 2

Post » Wed May 28, 2014 10:54 pm

So in my game there is a score text and a health bar in the top left corner. When the player moves it doesn't move the score and health with it. How do I make it so that they stay in the part of the screen I set them to but also move with the character.

I have included an example project I got from someone that has this in it. It can be seen on layouts 3 and 4 in the project, on the top left corner with the heart, the dog bone, and the number 0. So I need help duplicating how those move with the character.

If you need any more information feel free to ask! :D
You do not have the required permissions to view the files attached to this post.
Last edited by cockatoo2 on Wed May 28, 2014 11:42 pm, edited 1 time in total.
B
6
Posts: 14
Reputation: 257

Post » Wed May 28, 2014 11:05 pm

hi,
the Score, Health are named HUDS in games industry.
to do this:
1. Add new layer and name it "scorelayer" or anything
2. in the inspector, edit his Paralex properties and make it (0, 0)

thats all
let me know if this is true? :lol:
2D Game GUI Designer
B
12
S
4
G
3
Posts: 130
Reputation: 3,778

Post » Wed May 28, 2014 11:14 pm

Manarsoft wrote:hi,
the Score, Health are named HUDS in games industry.
to do this:
1. Add new layer and name it "scorelayer" or anything
2. in the inspector, edit his Paralex properties and make it (0, 0)

thats all
let me know if this is true? :lol:

Ok will check. post back in a minute if this works or not.
B
6
Posts: 14
Reputation: 257

Post » Wed May 28, 2014 11:26 pm

@Manarsoft
so it worked but also didn't work...

it is supposted to look like this (in editor format to show correctly):
See image attached below labeled "want"

but in fact it looks like this in game:
See image attached below labeled "current"

one other thing that was that it also jumped with the player as he jumped, which i don't want.

Can anyone help fix these?
You do not have the required permissions to view the files attached to this post.
B
6
Posts: 14
Reputation: 257

Post » Wed May 28, 2014 11:29 pm

The healthbar, score are made by the only idea gived to you "Parallex 0, 0"
I didn't understood you about the second question, can you explain the exact issue?
:mrgreen:
2D Game GUI Designer
B
12
S
4
G
3
Posts: 130
Reputation: 3,778

Post » Wed May 28, 2014 11:33 pm

Manarsoft wrote:The healthbar, score are made by the only idea gived to you "Parallex 0, 0"
I didn't understood you about the second question, can you explain the exact issue?
:mrgreen:

So the score bar is too close to his head and are not in the top left corner which I am trying to do. And also so it doesn't jump when the player jumps.
B
6
Posts: 14
Reputation: 257

Post » Wed May 28, 2014 11:40 pm

Fellow me:
1. Add new layer and name it "scorelayer"
2. Select this layer, and goto properties inspector in the left and find the Paralex propertie, make it 0, 0 for the two properties.
3. Add "Text" object and drag it in the Top-Left of your game area.

i didn't have the C2 installed here.
Try and let me know the result.
2D Game GUI Designer
B
12
S
4
G
3
Posts: 130
Reputation: 3,778

Post » Wed May 28, 2014 11:42 pm

Manarsoft wrote:Fellow me:
1. Add new layer and name it "scorelayer"
2. Select this layer, and goto properties inspector in the left and find the Paralex propertie, make it 0, 0 for the two properties.
3. Add "Text" object and drag it in the Top-Left of your game area.

i didn't have the C2 installed here.
Try and let me know the result.

actually I found a better way to fix it.

1. got to the layer properites and set it to paralex in editor
2. then set the text or sprite to the height you need then and it will be at the correct height!
B
6
Posts: 14
Reputation: 257

Post » Wed May 28, 2014 11:45 pm

thats what i'm tolking about !
i downloaded the C2, i will post the sample
2D Game GUI Designer
B
12
S
4
G
3
Posts: 130
Reputation: 3,778

Post » Wed May 28, 2014 11:53 pm

Hi,
this is your sample
;)
You do not have the required permissions to view the files attached to this post.
2D Game GUI Designer
B
12
S
4
G
3
Posts: 130
Reputation: 3,778


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, ignaciosimo and 16 guests