Ok, so in my game i have some triggers, that searching for the sequences of elements in map. Now i want make text tab if here are 3 same elements, and remove it, so I made function, that removing units. Problem is text tag, it must be removed after 5 seconds. So i think only way is make trigger(threaded), that will be called from function(not threaded), than will wait 5 second and destroy text. Problem is that i cant pass anything to triggers via global values, becase this often getting bad. I tried events, but they're probally not ready jet, true? Have you any idea to solve my problem?
I'm not sure what you are asking... You are creating text tags. You want to remove the text tags NOT after a time, but when you decide to destroy them? If this is the case, you can make an array and put the text tags in that array so you can destroy them when ever you want.
can't you just use:
Action Definition - Create Temporary Text Tag (Threaded)
Parameters
Text to display - Text
Location - Point
Local Variable
TextTagCreated - Text Tag
Create Text Tag (Text to display, location)
Set TextTagCreated = Last Created Text Tag
wait 5.0
destroy TextTagCreated
Ok, so in my game i have some triggers, that searching for the sequences of elements in map. Now i want make text tab if here are 3 same elements, and remove it, so I made function, that removing units. Problem is text tag, it must be removed after 5 seconds. So i think only way is make trigger(threaded), that will be called from function(not threaded), than will wait 5 second and destroy text. Problem is that i cant pass anything to triggers via global values, becase this often getting bad. I tried events, but they're probally not ready jet, true? Have you any idea to solve my problem?
I'm not sure what you are asking... You are creating text tags. You want to remove the text tags NOT after a time, but when you decide to destroy them? If this is the case, you can make an array and put the text tags in that array so you can destroy them when ever you want.
Och, you dont understand. I want destroy tag after 5 seconds, but cant place wait in function that creates it(or orders to create).
Searching script removing units many times per second, and cant place there any waits.
@ShadowDancer93:
can't you just use:
Action Definition - Create Temporary Text Tag (Threaded)
Parameters
Text to display - Text
Location - Point
Local Variable
TextTagCreated - Text Tag
Create Text Tag (Text to display, location)
Set TextTagCreated = Last Created Text Tag
wait 5.0
destroy TextTagCreated
I thought Text Tags came with timers?... hrmmm
Oh, set time of text tag?...
@Anthius: Go
Time of text tag is their life time. They will automatically dies after that time and also fade out. Destroy it will not get the fade effect
@progammer: Go
I think that's the behavior he wants... create a timer, and have it dissappear after X time.
Och, didn't know that tag can be timed, thanks for help - now i can finish my map.
Anyway it don't solve my question(at all).