HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Float Text

11-09-2003, 10:26 AM#1
AZN-Enigma
Is there a way to clear the whole map of all float text instead of lasted created float text. Or better yet is there a way to just make it last 5 seconds then dissapper without continuous triggers. :)

Well, I read some one say in one of the old post that there was a way to have entered text turn into a float over a unit. Anyone know how to do this?
11-09-2003, 12:00 PM#2
Balthamos
Well...I'd say, you create an array of floatingtexts and timers and booleans. Have them all contain up to 50 places and then have a trigger saying, and a single integer would be needed.

Event: Player sends message
Condition:Not sure actually...may not need any
Actions: Clear game text (getting rid of his message)
Create floating text above heroes(playernumber of triggering player) text says 'chatmessage event'
Set floatingtext(singleinteger) = last created ft
Set Booleanarray(singleinteger) = true
Start new single countdown timer for timer(singleinteger) for countinteger(letters in 'chatmessage event') x 2 seconds
Set singleinteger = singleinteger + 1
if singleinteger = 50 then singleinteger = 1
else donothing endif

Then create another trigger

Event: timer(1) expires
Condition: None
Actions:
for a = 1 to 50
if booleanarray(a) = true then
if real(remainingtime on timer(a) <= 0.00) then
clear floatingtext(a)
set booleanarray(a) = false
elseif donothing endif
elseif donothing endif
next a

now convert to customtext, look at the bottom of the new text trigger, copy and paste the part about timer(1) expiring and get 50 of them, quickly go by hand and replace each one with 1,2,3,4,5,6,7,8,9...etc until you hit 50. So there's 50 different events, one for each timer...

That'll all work except that of course the floatingtext will not follow the units, I assume you already knew that...if you find a lagfree way of having it follow units, please tell me. goodluck.
11-10-2003, 05:49 PM#3
element_5
Quote:
Originally posted by Balthamos
Well...I'd say, you create an array of floatingtexts and timers and booleans. Have them all contain up to 50 places and then have a trigger saying, and a single integer would be needed.


LOL, or you could just convert it to JASS and use a local variable. Go here for an example of this (among other things): Trigger Examples for Newbs and Experts Alike

If you still need help, I can make one that does exactly what you want
11-10-2003, 06:02 PM#4
FerretDruid
I could use a trigger for that as well. I'm working on my float text trigger ATM, and I downloaded your map so I'll check yours out.

Mine works right now to a degree.. But it's real buggy, and often the text will just keep on floating up and up and up being ignored completely by the "destroy last created floating text" action (due to another floating text being created before the "wait - 3 seconds" timer expired.

So, yeah. Good times... sigh