S
SoCal_420
Guest
This Trigger will a trigger on how to show chat text.
"Chat Text (Text floats over unit)"
The Trigger
This is pretty simple. when you tpye something it shows a floating text over your hero.
1. You will need 1 variables
Type = Floating Text Array
i Named My variable FloatingText
2.First the event should be player 1 types something. make the message = <empty string>. it should look like this:
3.Next You will need to destroy all the other floating texts by that player thats where the variable comes in.
4.Then you pick all the units owned by that player of hero. then in that loop create a if/then/else. like sooo
and the then actions we are going to show the floating text and set it.
or for the showing of the text you cuold do this
so that way he floating text is like this
SoCal_420: Test
(it shows your name 2)
4. now do this do destroy the floating text after a certain amount of time.
You can modify this to make it mroe fancy with color codes ect..
"Chat Text (Text floats over unit)"
The Trigger
This is pretty simple. when you tpye something it shows a floating text over your hero.
1. You will need 1 variables
Type = Floating Text Array
i Named My variable FloatingText
2.First the event should be player 1 types something. make the message = <empty string>. it should look like this:
Code:
.
Events
Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
.
3.Next You will need to destroy all the other floating texts by that player thats where the variable comes in.
Code:
.
Floating Text - Destroy FloatingText[(Player number of (Triggering player))]
.
4.Then you pick all the units owned by that player of hero. then in that loop create a if/then/else. like sooo
Code:
.
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A Hero) Equal to True
Then - Actions
Else - Actions
Code:
.
Then - Actions
Floating Text - Create floating text that reads (Entered chat string) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Set FloatingText[(Player number of (Triggering player))] = (Last created floating text)
or for the showing of the text you cuold do this
Code:
.
Floating Text - Create floating text that reads ((Name of (Triggering player)) + ( + (Entered chat string))) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
.
SoCal_420: Test
(it shows your name 2)
4. now do this do destroy the floating text after a certain amount of time.
Code:
.
Wait (Real((Length of (Entered chat string)))) seconds
Floating Text - Destroy FloatingText[(Player number of (Triggering player))]
.
Code:
This is the final trigger:
Show
Events
Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
Conditions
Actions
Floating Text - Destroy FloatingText[(Player number of (Triggering player))]
Unit Group - Pick every unit in (Units in (Playable map area) owned by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A Hero) Equal to True
Then - Actions
Floating Text - Create floating text that reads (Entered chat string) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Set FloatingText[(Player number of (Triggering player))] = (Last created floating text)
Else - Actions
Wait (Real((Length of (Entered chat string)))) seconds
Floating Text - Destroy FloatingText[(Player number of (Triggering player))]
You can modify this to make it mroe fancy with color codes ect..