• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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: 254
Status
Not open for further replies.
Top