• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Improved floating texts help needed

Status
Not open for further replies.
Level 1
Joined
Jun 13, 2008
Messages
132
Hi there people, I am making a big rpg and I am trying my best with this project, currently my floating texts system shows a lot of floating texts when you deal a lot of instances of damage in a short period of time, this makes my game look ugly, I would like to know a way to make floating text refresh and show the total of damage dealt, for example, if you dealt 20 damage points, and then you deal 22 damage points, your floating text of 20 damage points changes to 20+22 (44).
Other thing I would like to know is, how can I make my floating texts get bigger and then get smaller?
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Firstly, to stagger the texts:
You'll need two triggers.

Trigger 1:
When a unit takes damage, set a DamageTaken[unit id] real variable to DamageTaken[unit id] + event response - damage taken.
Add this unit to a group for later reference.

Trigger 2:
Period event, every 0.5 seconds or so (however often you want it)
Display that DamageTaken[unit id] value above each unit in the abovementioned group.
Reset DamageTaken[unit id] to 0.

Next, to change the floating text sizes. You'll need to instance every floating text in an array, and periodically (every 0.03 sec) loop through them and increase/decrease as necessary.
 
Level 1
Joined
Jun 13, 2008
Messages
132
Firstly, to stagger the texts:
You'll need two triggers.

Trigger 1:
When a unit takes damage, set a DamageTaken[unit id] real variable to DamageTaken[unit id] + event response - damage taken.
Add this unit to a group for later reference.

Trigger 2:
Period event, every 0.5 seconds or so (however often you want it)
Display that DamageTaken[unit id] value above each unit in the abovementioned group.
Reset DamageTaken[unit id] to 0.

Next, to change the floating text sizes. You'll need to instance every floating text in an array, and periodically (every 0.03 sec) loop through them and increase/decrease as necessary.

Thank you very much! however, now I will need to make a mui system to handle all the stuff, this is going to kill me >.< +rep. for you.
 
Status
Not open for further replies.
Top