How to: Create Chat over Unit

Tutorial By Blackveiled

Text over Unit over Unit Tutorial
INTRODUCTION

The way this tutorial works is it will put chat over your unit...


also adding a name infront (optional)

It works by using floating text and variable arrays.


STEPS
I. Trigger Creation
IV. Setting up the chat system

THE TRIGGERS
I. Create "2" triggers
1 called Init and one called Talking

Creating the "INIT" trigger will setup the triggers for map initialization.

Once you created the "INIT" trigger, create a variable, if you are new to variables click the glowing orange "X" at the toolbar.

Now create a unit variable with an Array.

Arrays store extra information for several units.

Okay, create a "UNIT" [Array] Variable named PlayerUnits or whatever you want to name it. And now go back to your trigger make a number for each players (automatically done in the next trigger) 1-12 or whatever you want.

Set the variable to the unit for the player you want them to chat over.

Your trigger should at least have something like this

(Image)

II. Setting up the chat system

Now as I think you have created a trigger for the chat to be operated on.

Now add this.



it will turn on this trigger

the condition will be

EVENTS
Player - Player 1 (red) types in . as a substring
CONDITIONS
(substring((Entered Chat String) 1, 1) Equal to .
ACTIONS
Floating Text - Create a floating text that reads (((Player name of Triggering Player) + |r + (substring(entered chat string) 2, 40))) above PlayerUnits [Player number of (triggering player)] with Z offset 0.00, size 8.00, color (100.00% and 100.00% and 100.00%) and 0% transparency.
Floating Text - Change (Last Created Floating Text): Disable Permanence
Floating Text - Change the Lifespan of (Last Created Floating Text) to 3.50 seconds.
Floating Text - Change the fading age of (Last Created Floating Text) to 0.00 seconds.
Floating Text - Set the velocity of (Last Created Floating Text) to 15.00 to 90.00 degrees.



If you couldnt read the top text you can use ...

Chat Layout ...
(Image)

Floating Text Full...

(Image)

If this worked it should look like this!

(Image)

Thanks for reading my tutorial!

++Rep Appreciated

Click here to comment on this tutorial.
 
 
Blizzard Entertainment, Inc.
Silkroad Online Forums
Team Griffonrawl Trains Muay Thai and MMA fighters in Ohio.
Apex Steel Pipe - Buys and sells Steel Pipe.