• 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.

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? :)
 
Level 9
Joined
Nov 19, 2011
Messages
516
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.
 
Level 4
Joined
Jan 3, 2012
Messages
60
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?
 
Level 9
Joined
Nov 19, 2011
Messages
516
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

  • text.w3x
    17 KB · Views: 256
Status
Not open for further replies.
Top