| 06-05-2004, 09:45 PM | #1 |
You know how the box comes over the d2 units??? well has this already been dun? if not i don't even know how to do the event trigger for like to say what the guy said... err ok i mean Red types FUN and say i wanted FUN to pop up in floating text somewhere |
| 06-05-2004, 10:30 PM | #2 |
You have to set each player's hero to a variable and whenever they type a message, set the message to string variable. Then create a floating text above the Hero, wait a few seconds, and destroy it. |
| 06-06-2004, 05:06 AM | #3 |
... And this string variable is dun how? |
| 06-06-2004, 03:18 PM | #4 |
that's a good idea to make the text go over the head of the hero/unit, i am gonna use that in my d2 project |
| 06-06-2004, 08:30 PM | #5 |
how do i do IT!! |
| 06-06-2004, 09:00 PM | #6 |
Like this: Code:
Set StringVariable = (Entered chat string) |
| 06-06-2004, 10:22 PM | #7 |
If i did that the oposite way will it still work? Entered = Variable ALSO how do i get it to work only if theres a - infront of it |
| 06-06-2004, 11:10 PM | #8 |
it's still not working for me |
| 06-06-2004, 11:16 PM | #9 |
Hmmm... I just ran a test and using this triggers: Code:
Mayo
Events
Player - Player 1 (Red) types a chat message containing as A substring
Conditions
Actions
Set tempstring = (Entered chat string)
Floating Text - Create floating text that reads tempstring above Footman 0015 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparencyThe only problem was detecting when the Player typed something. I used space as a substring, but if the tyoed message doesn't have a space this won't work... I'll see if I can't find another way to trigger the event. [edit] - Replace the space with nothing. It should say <Empty String> In the editor. Also, I didn't have it my trigger, but you'll need a way to remove the text. Set it to a variable, wait for a bit, and then destroy the text attached to that variable. |
| 06-06-2004, 11:19 PM | #10 |
string Events Player - Player 1 (Red) types a chat message containing <Empty String> as An exact match Conditions test2 Equal to (Entered chat string) Actions Floating Text - Create floating text that reads test2 above Chatter 0000 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency Set text3[0] = text3[1] Floating Text - Show (Last created floating text) for (All players) Wait 10.00 seconds Set text3[1] = text3[0] then the variable to go along with it to make it stay above the unit is.. Red Events Time - Every 0.51 seconds of game time Conditions text3[0] Equal to text3[1] Actions Floating Text - Create floating text that reads test2 above Chatter 0000 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency Wait 0.50 seconds Floating Text - Destroy (Last created floating text) Whats wrong plz tell me |
| 06-06-2004, 11:20 PM | #11 |
OH well i'm lost... ;\ |
| 06-06-2004, 11:26 PM | #12 |
Try looking over my trigger and see how I did it. You don't want condtions... I'll put together a trigger that will do the job for. |
| 06-06-2004, 11:38 PM | #13 |
So then it's not possible for it to do it only if they type -then w/e here cuz if you can't put a dash it will always put it in the floating text (box) |
| 06-06-2004, 11:42 PM | #14 |
Well, you can set it so the game will detect if there is a - anywhere inside the string, but that would trigger even if you said "Doom-Guard". Anyway, here's the code I put together: Code:
Mayo
Events
Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
Player - Player 2 (Blue) types a chat message containing <Empty String> as A substring
Player - Player 3 (Teal) types a chat message containing <Empty String> as A substring
Player - Player 4 (Purple) types a chat message containing <Empty String> as A substring
Player - Player 5 (Yellow) types a chat message containing <Empty String> as A substring
Player - Player 6 (Orange) types a chat message containing <Empty String> as A substring
Player - Player 7 (Green) types a chat message containing <Empty String> as A substring
Player - Player 8 (Pink) types a chat message containing <Empty String> as A substring
Player - Player 9 (Gray) types a chat message containing <Empty String> as A substring
Player - Player 10 (Light Blue) types a chat message containing <Empty String> as A substring
Player - Player 11 (Dark Green) types a chat message containing <Empty String> as A substring
Player - Player 12 (Brown) types a chat message containing <Empty String> as A substring
Player - Neutral Hostile types a chat message containing <Empty String> as A substring
Player - Neutral Victim types a chat message containing <Empty String> as A substring
Player - Neutral Extra types a chat message containing <Empty String> as A substring
Player - Neutral Passive types a chat message containing <Empty String> as A substring
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
tempstring[(Player number of (Triggering player))] Not equal to <Empty String>
Then - Actions
Floating Text - Destroy temptext[(Player number of (Triggering player))]
Set tempstring[(Player number of (Triggering player))] = (Entered chat string)
Floating Text - Create floating text that reads tempstring[(Player number of (Triggering player))] above Footman 0015 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Set temptext[(Player number of (Triggering player))] = (Last created floating text)
Wait 4.00 seconds
Floating Text - Destroy temptext[(Player number of (Triggering player))]
Set tempstring[(Player number of (Triggering player))] = <Empty String>
Else - Actions
Set tempstring[(Player number of (Triggering player))] = (Entered chat string)
Floating Text - Create floating text that reads tempstring[(Player number of (Triggering player))] above Footman 0015 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Set temptext[(Player number of (Triggering player))] = (Last created floating text)
Wait 4.00 seconds
Floating Text - Destroy temptext[(Player number of (Triggering player))]
Set tempstring[(Player number of (Triggering player))] = <Empty String> |
| 06-06-2004, 11:44 PM | #15 |
string Events Player - Player 1 (Red) types a chat message containing <Empty String> as A substring Conditions Actions Set test2 = (Entered chat string) Floating Text - Create floating text that reads test2 above Chatter 0000 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency Set text3[0] = text3[1] Floating Text - Show (Last created floating text) for (All players) Wait 10.00 seconds Set text3[1] = text3[0] then 2... Red Events Time - Every 0.51 seconds of game time Conditions text3[0] Equal to text3[1] Actions Floating Text - Create floating text that reads test2 above Chatter 0000 <gen> with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency Wait 0.50 seconds Floating Text - Destroy (Last created floating text) i'll see if mine works now |
