| 02-04-2007, 03:21 PM | #1 |
The idea is whenever a unit in the map casts a certain spell, I want it to instantly create a floating text that says "Score +1" or something similar. I have it working fine, but the problem arises whenever multiple people do it: the floating text created is set to a player-specific variable right after it is created (for deletion after a few seconds). So whenever two or more people fire off the trigger simultaneously one of the floating text might not be assigned to said variable and just continue floating up until it is out of view. Any ideas on how to work around this? Any help would greatly be appreciated ![]() |
| 02-04-2007, 03:29 PM | #2 |
Yes. Use a floating text function that removes it after a certain period of time. I'm guessing you used: Wait ~Seconds Destroy Floating Text. Instead, use this: Trigger: Actions
![]() Set TempPoint = (Position of (Triggering unit))
![]() Floating Text - Create floating text that reads Score +1 at TempPoint with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
![]() Floating Text - Change (Last created floating text): Disable permanence
![]() Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
![]() Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
![]() Custom Script: call RemoveLocation(udg_TempPoint)That will create the floating text, disable permanance, make it move up the screen, then kill it after 5 seconds. |
| 02-04-2007, 06:02 PM | #4 |
Any suggestions to completely wipe out this problem? on a side note what happens to the text that keeps scrolling forever off the map? |
| 02-04-2007, 06:53 PM | #5 |
Maybe add the fade thing you can pick to when it fades away but i think it will cause a leak or maybe does lifespan get rid of it. |
| 02-04-2007, 08:10 PM | #7 |
locals might help -Av3n |
| 02-04-2007, 08:15 PM | #8 | |
Quote:
Not really. The trigger dosent use a variable anyway, a local will just complicate things even more. Please be more specific on what is being removed, how many does get removed before this one that stays? Check more stuff and give more infomation, otherwise we will never find the problem. EDIT: Damn, forgot. You need to set the fading age, that might be it, im not sure, try that anyway, set the fading age to like 1 second or something, theyres a GUI action for that. |
| 02-05-2007, 10:15 PM | #9 |
It works! After running several tests, no pesky floating text sneaking by! Thanks for your help! |
