• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

How do I change Floating Text?

Status
Not open for further replies.
Level 4
Joined
Jan 3, 2012
Messages
60
Hey :)

This is maybe a pretty noobish question, but im pretty noobish too :D

I've made some triggers that creates 4 Floating Texts. My problem is that i want them to be changed when a unit enters a region. I know that there is a action that is called "Change Text" but i can only make it change the last created Floating Text. So how do i need to do? :)
 
Create variable with floating text type, that after creating make acction:

set your_variable = last created floating text

this way you will be able to change those floating texts.

=========
IMPORTANT
=========
Notice that computer is not a human. He will not remember anything if you don't tell him so. Its recomended to make variables for all objects that can be doubled.
 
Create variable with floating text type, that after creating make acction:

set your_variable = last created floating text

Aldready tryed that. It will remove the last created floating text instead of removing the right one... but thanks :)
Or maybe im just doing it wrong.. could you post the triggers?
 
Look at this. If its not enought see attachment.

Variables:
Floating_Text_Left, Floating_Text_Right : text;

Trigger - init
Event - map init
Conditions - none
Acctions:
{
Create floating text that reads "your text" above point (cetre of your region).
Set Variable Floating_Text_Left = Laste Created
Create floating text that reads "your text" above point (cetre of your region).
Set Variable Floating_Text_Right = Laste Created
}


Trigger - change_left
Event - your_event
Conditions - none
Acctions:
{
change text of (Floating_Text_Left) to (your text)
}
 

Attachments

Status
Not open for further replies.
Back
Top