Number color based on value?
3absh
Member Posts: 601
I need floating experience points over slaughtered monsters. The floating and fading part is resolved, but I haven't figured out how to make the "Display text" behaviour relate the color and size of text to the value being displayed as there are no expression editors, do you guys think there's a way around it?
Or should I just wait for the following GS update that will feature a personal font editor and see what it has to offer. What do you guys think?
Comments
In other words, the bigger the monster killed the more "red" the exp points and the bigger the size of those points
You can't control the text display behaviour in any useful kind of way - like adjusting colour or opacity or size - so you might be better off using a custom font (essentially images) as you have much more control.
"the following GS update that will feature a personal font editor"
I've not heard any rumours that the actual Display Text behaviour's functionality will change, just that you will now be able to import fonts so are not limited to the built-in system fonts.
You can't do that unless you want to make separate rules for each Display Text behavior set to a particular share of red and font size.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
As a work around . . . you could do this for the colour:
Create an actor with your text in white (assuming the text starts out white).
Duplicate this actor and on the duplicate version make the text red and 5% opaque.
Then using a Replicate behaviour on this second actor (with spacing set to 0) you can control the amount of red using the Copies value.
Nice idea, @Socks!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Cheers, it should be reasonably efficient as it's only using Replicate.