Text Update Issue

Discussion and feedback on Construct 2

Post » Sun Jan 18, 2015 8:14 pm

Sorry if in wrong place, made account to post :|

I created a GUI HUD thing to show score/hp and it worked fine.

I then created a start up screen for my game and bam the hp dont show up!

It seems to be an issue with the variable original value because it wont show anything but 0 as default.

(FYI instructions doesn't do anything ATM)
I'll upload the file see if any gurus can help :mrgreen:

Thanks, don't face palm too hard lol :roll:
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 8
Reputation: 193

Post » Sun Jan 18, 2015 8:48 pm

you have it so that when 2 zombies collide, 1 is taken from playerHealth. And there's lots of collisions so.. the number looks right (as in, it quickly goes negative). I assume you want to check for Player colliding with ZombieKid
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sun Jan 18, 2015 10:24 pm

Sorry for the mistake, I was using a backup to return to state for upload.

The problem I have persists even after changing it to: :oops:
zombie, on collision with player > -1 from health

The problem is in game health displays as "Health: " when it should say "Health: 45" if you had 45 health for example.

There is similar code for the score that works fine.
set text to > "Health: "& playerHealth

D: Derp! :roll:
B
3
Posts: 8
Reputation: 193

Post » Sun Jan 18, 2015 11:37 pm

looks ok to me? Or I'm not getting it
zombiekid.png
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Mon Jan 19, 2015 8:25 am

Thats really strange! I've got no number displayed for some reason while it works for you?

For me it simply just says "Health: "

Perhaps I need to re-install construct?
You do not have the required permissions to view the files attached to this post.
Last edited by SubZeroBricks on Mon Jan 19, 2015 8:29 am, edited 1 time in total.
B
3
Posts: 8
Reputation: 193

Post » Mon Jan 19, 2015 8:27 am

SubZeroBricks wrote:Thats really strange! I've got no number displayed for some reason while it works for you?

For me it simply just says "Health: "

Perhaps I need to re-install construct?


well.. that's kind of extreme but it's up to you. I'd try a new project with a text object, or one of the sample, and see if it works.

try the one I saved:
zombie game.capx
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Mon Jan 19, 2015 8:36 am

I'd guess it's the font you're using and the size of your font box. The number is probably just going outside your font box and getting cut off. Try a different font or a bigger box.

Down with text, up with Spritefont!
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Mon Jan 19, 2015 8:39 am

spacedoubt wrote:I'd guess it's the font you're using and the size of your font box. The number is probably just going outside your font box and getting cut off. Try a different font or a bigger box.

Down with text, up with Spritefont!


I was going to suggest that except it works for me which is strange.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Mon Jan 19, 2015 8:44 am

codah wrote:I was going to suggest that except it works for me which is strange.


Yeah, but in your screenshots, his font looks completely different than yours. So he's probably using some font that you don't have, so yours defaults to a different one that happens to fit in the box.
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Mon Jan 19, 2015 9:18 am

spacedoubt wrote:
codah wrote:I was going to suggest that except it works for me which is strange.


Yeah, but in your screenshots, his font looks completely different than yours. So he's probably using some font that you don't have, so yours defaults to a different one that happens to fit in the box.


hey yeah :lol:

edit: well actually I don't think he had posted his screenie before :)
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Next

Return to Construct 2 General

Who is online

Users browsing this forum: WealthyKing and 16 guests