HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Deleting Floating Text Problem

02-04-2007, 03:21 PM#1
SockSquirrelMouthwash
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
The)TideHunter(
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, 04:36 PM#3
SockSquirrelMouthwash
Awesome man! Thanks a bunch!

Update: It greatly reduced the number of non-deleted floating text, but there's still a few that get away:

Trigger:
Collapse Events
Unit - A unit Begins channeling an ability
Collapse Conditions
(Ability being cast) Equal to Spell (based off of channel spell)
Collapse Actions
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 - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees

Now this trigger applies to every player since they have the Spell ability.
02-04-2007, 06:02 PM#4
SockSquirrelMouthwash
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
mikke95
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, 06:59 PM#6
The)TideHunter(
Quote:
Originally Posted by SockSquirrelMouthwash
Awesome man! Thanks a bunch!

Update: It greatly reduced the number of non-deleted floating text, but there's still a few that get away:

Trigger:
Collapse Events
Unit - A unit Begins channeling an ability
Collapse Conditions
(Ability being cast) Equal to Spell (based off of channel spell)
Collapse Actions
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 - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees

Now this trigger applies to every player since they have the Spell ability.

Its impossible for any to get away, the lifespan should be applied to every single one, unless Last created floating text is returning incorrect values.
02-04-2007, 08:10 PM#7
Av3n
locals might help

-Av3n
02-04-2007, 08:15 PM#8
The)TideHunter(
Quote:
Originally Posted by Av3n
locals might help

-Av3n

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
SockSquirrelMouthwash
It works! After running several tests, no pesky floating text sneaking by! Thanks for your help!