How do I show a damage text above the enemy

Get help using Construct 2

Post » Fri Jun 23, 2017 5:36 am

ok let say when i shoot my enemy
i want to show the damage my ship do to this eneny so im trying
set text : "+ " & player.damage

now the problem is it show only the +
B
29
S
9
G
3
Posts: 138
Reputation: 3,804

Post » Fri Jun 23, 2017 7:50 am

Perhaps you have 'Wrapping' set on Character with a box that is 2 small ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jun 23, 2017 8:06 am

nah the text box is really big

it simply dont work if i use the object varriable and use a random set value on the variable
B
29
S
9
G
3
Posts: 138
Reputation: 3,804

Post » Fri Jun 23, 2017 8:23 am

Are you sure that the instance variable "Damage" of your "Player" object contains a proper number to display ?
To make sure, post your capx, it will be easier to investigate what is going on.

A basic demo of what you are asking is as follow : EXAMPLE
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,328
Reputation: 71,288

Post » Fri Jun 23, 2017 8:40 am

yeah for fixed numbers it work but i want them to be from 10 to 100 for exemple and then they dont display anymore
B
29
S
9
G
3
Posts: 138
Reputation: 3,804

Post » Fri Jun 23, 2017 8:49 am

ok found how to do so and its
round(random(10,100))
B
29
S
9
G
3
Posts: 138
Reputation: 3,804


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 5 guests