- Joined
- Feb 17, 2007
- Messages
- 368
How do I make chat appear over a unit when the unit hasn't already been pre-placed into the map, and is instead created through a hero selection system?
For example, this system is for units that are ALREADY preplaced in the game:
Actions
For example, this system is for units that are ALREADY preplaced in the game:
Actions
-
Map initialization
-
-------- SET VARIABLES --------
-
-------- Setting the unit variable makes it so the chat goes over the exact unit you want it to go over. --------
-
-------- To make it easier, you can make it so when they create a hero, or buy one, it sets the variable to that. --------
-
-------- The system will not work if you don't have it over the correct unit. --------
-
Set c_unit[1] = Footman 0000 <gen>
-
Set c_unit[2] = Footman 0001 <gen>
-
-
Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
-
Actions
-
Floating Text - Create floating text that reads ((|cffffcc00 + (Name of (Owner of c_unit[(Player number of (Triggering player))]))) + (:|r + (Substring((Entered chat string), 2, 255)))) above c_unit[(Player number of (Triggering player))] 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 7.00 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
-
Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
-
-
Unit Group - Add (Last created unit) to Hero_Selected_Unit_Group