| 11-05-2003, 04:16 PM | #1 |
A way how to make multiple floating text fade out. I dont know how good this is online and wether you may want to edit it for you use. |
| 11-05-2003, 04:51 PM | #2 |
That's amazingly like the floating text example I posted 11 days ago here: http://www.wc3campaigns.com/forums/s...threadid=33950 I'm not saying you copied, or that you even downloaded the map I put up, just that our coding is similar. Here's a comparison: Your Code: Code:
local texttag ft = GetLastCreatedTextTag()
local integer trans = 0
call SetTextTagVelocityBJ( ft, 32, 90 )
call PolledWait( 1.00 )
loop
exitwhen trans > 100
call SetTextTagColorBJ( ft, 100, 80, 20, I2R(trans) )
if ( trans == 100 ) then
call DestroyTextTagBJ( ft )
endif
call PolledWait( 0.05 )
set trans = trans + 10
endloopCode:
local unit returning = udg_unitReturning
local texttag OilText = CreateTextTagUnitBJ( "+" + I2S(udg_intOilPerTrip), returning, 0, 10, 0.00, 0.00, 0.00, 0 )
call SetTextTagVelocityBJ( OilText, 40.00, 90 )
call PolledWait( 1.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call SetTextTagColorBJ( OilText, 0.00, 0.00, 0.00, ( 10.00 * I2R(GetForLoopIndexA()) ) )
call TriggerSleepAction( 0.01 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DestroyTextTagBJ( OilText )As you can see, they are programmatically pretty similar. I'm am aware that there is more than one way to skin a cat, but not many more ;) |
| 11-05-2003, 04:53 PM | #3 |
lol Didn't even see your map sorry. |
| 11-05-2003, 04:56 PM | #4 |
Hey, no problem... I know I'm not the only guy on here that can get an idea of how to do something. I've had that floating text thing done for months, but I only recently shared it :) |
