They're instance variables from the game object itself (I have two towers with 2 different health bars).
They are triggered in various events, for example, when a fireball collides with them, a minion shoots at them. It's basically a Clash Royale for study purposes.
But the numbers are changed only with random events, sometimes the fireball does, and sometimes doesn't.
I'm also double checking the triggers to see if there is a problem, but the variable in the debugger is OK.
Here is a simple example in my game capx.
http://imgur.com/jSKKiXq
reads: thunder > on collision with tower01Player02 > is not invulnerable > subtract 25 from HP > set text to variable
The 'invulnerable' variable is only set to true when the player uses a shield, so it's always false.
Also, here it is the capx with the example (that works and updates fine) from a trigger I got in my game.
https://www.dropbox.com/s/rsr85gq6h2b6u9n/DamageSample.capx?dl=0
Weird thing is, I have a catapult-like character that shoots projectiles at the tower, and strangely, this works very well. But the fireball neither the thunder works.
[quote:3o4gdtrk]Post by andreyin » Sun Nov 27, 2016 3:00 am
Instead of using "set text to baseDeus01.vida" try using "set text to str(baseDeus01.vida)"
If the vida variable is a number it should work if you convert it to a string to use in the text object.
I did the way you said and works like a charm now!
But why? Isn't the common way supposed to work too?