| 03-04-2007, 09:10 AM | #1 |
Hello, I made a fully working backstab except for one thing... when a unit backstabing another it comes a floating text were it says "backstab" and then i made a trigger that destroys the floating text, but if a unit has wery fast atk speed the floating text wont dissapear. Heres the trigger: Floating Text - Create floating text that reads Backstab at (Position of (Attacked unit)) with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency Set Backstab[0] = (Last created floating text) Wait 2.00 seconds Floating Text - Destroy Backstab[0] How to destroy more than 1 floating text in the same trigger? |
| 03-04-2007, 09:58 AM | #2 |
Obviously the Backstab variable is being overwritten so you could use an array or I'm pretty sure this would work: JASS:local location u=GetUnitLoc(GetTriggerUnit()) local texttag t=CreateTextTagLocBJ("Backstab",u,0,10,0,100,0,0) call PolledWait(2) call DestroyTextTag(t) call RemoveLocation(u) set t=null set u=null |
| 03-04-2007, 10:13 AM | #3 |
Why not just add an expiration timer for the floating text? Should look like Trigger: Actions
![]() Set temp_point = (Position of (Triggering unit))
![]() Floating Text - Create floating text that reads <Message> at temp_point with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
![]() Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
![]() Floating Text - Change (Last created floating text): Disable permanence
![]() Custom script: call RemoveLocation(udg_temp_point) |
| 03-04-2007, 10:28 AM | #4 |
Thx that seems to work :) |
