• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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