Create custom height?

Get help using Construct 2

Post » Fri Oct 25, 2013 12:45 pm

Hi,

how would I get or create a custom height for my player which will be shown in a text object?

I have tried:

Every tick>
Set CurrentHeight(-989) + player.Y
Set text to "Current Height: " & CurrentHeight

but the text shows decimal places and does not always show up, as if it's glitching.

.CAPX
B
25
S
6
G
3
Posts: 197
Reputation: 3,355

Post » Fri Oct 25, 2013 1:35 pm

could you reupload it without clay.IO and bound to layout ? I can help you for sure ;)
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Fri Oct 25, 2013 9:55 pm

Sure, here it is: .CAPX

Just to clarify, the player is on a platform where the Y axis or 'height' should be 0 and when the play jumps, the 'height' value increases and is reflected in the "Current Height:" text.TwinTails2013-10-25 21:57:43
B
25
S
6
G
3
Posts: 197
Reputation: 3,355

Post » Wed Oct 30, 2013 6:09 pm

Not sure if you saw the updated one or not but did you figure something out?
B
25
S
6
G
3
Posts: 197
Reputation: 3,355

Post » Wed Oct 30, 2013 6:11 pm

@Darklinki
B
25
S
6
G
3
Posts: 197
Reputation: 3,355

Post » Thu Oct 31, 2013 9:16 am

thanks didnt saw that you have replied until the @

@twintails .capx is down (without clay.io and bound)Darklinki2013-10-31 09:18:08
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Fri Nov 01, 2013 1:12 pm

@Darklinki Sorry, I think the link had a space in it... try this
B
25
S
6
G
3
Posts: 197
Reputation: 3,355

Post » Fri Nov 01, 2013 2:36 pm

This will work:

player set actualheight : abs(round(player.Y-989))
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Nov 03, 2013 9:26 pm

@LittleStain Thanks! That worked great :)
B
25
S
6
G
3
Posts: 197
Reputation: 3,355


Return to How do I....?

Who is online

Users browsing this forum: sean080 and 18 guests