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 +
http://www.twitch.tv/kiugetski
https://discord.gg/55R9Gbs

feel free to contact me of follow me :) i can give some advice
B
32
S
9
G
3
Posts: 145
Reputation: 3,895

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
29
Posts: 2,493
Reputation: 21,450

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
http://www.twitch.tv/kiugetski
https://discord.gg/55R9Gbs

feel free to contact me of follow me :) i can give some advice
B
32
S
9
G
3
Posts: 145
Reputation: 3,895

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
304
S
123
G
99
Posts: 7,358
Reputation: 73,460

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
http://www.twitch.tv/kiugetski
https://discord.gg/55R9Gbs

feel free to contact me of follow me :) i can give some advice
B
32
S
9
G
3
Posts: 145
Reputation: 3,895

Post » Fri Jun 23, 2017 8:49 am

ok found how to do so and its
round(random(10,100))
http://www.twitch.tv/kiugetski
https://discord.gg/55R9Gbs

feel free to contact me of follow me :) i can give some advice
B
32
S
9
G
3
Posts: 145
Reputation: 3,895


Return to How do I....?

Who is online

Users browsing this forum: Ikkim201 and 9 guests