• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Floating text issue

Status
Not open for further replies.
Level 28
Joined
Mar 25, 2008
Messages
2,955
Well.. i try to explain:
I have a unit a which shall have a floating text above it's model (it shows: Hits: x. The floating text (x) raises up by 1 everytime the unit attacks.
But since i can't caluclate the amount of units (with the text) which could be built, like either 10 or 100 or 1000 or else (they are not preplaced on the map), i don't know how to assign the variables which shall refer to the different floating texts.
Any solutions?
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
So, like whenever the unit attacks, increase the units' custom value by 1? And then Set the text for floating text ftext[custom value of (attacking unit)] to custom value of attacking unit + 1?
Won't there be complications if two units have the same custom value?

Well the unitamount won't go that high i suppose..
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
well not being able to use jass is not a big problem

Download the perfect unit indexing system
implement to your map

create 2 variables one named INDEX
one named UNIT

when getting units index
set UNIT = your unit
Custom script: set udg_INDEX = GetUnitIndex(udg_UNIT)
then INDEX becomes index of that unit

btw Im not sure about the function name
or just nvm and wait for poots tut (suggested)
 
Status
Not open for further replies.
Top