Chat Text

BSJikan

New Member
Reaction score
5
How do I make it so that text continues to scrolls through a game over and over again like I've seen done in a few TD's?
 

BSJikan

New Member
Reaction score
5
Like, in some games, you know how sometimes the chat repetedly says things like "(TIP) - Don't forget about AIR", or something like that? I was woundering how that was done. All my searches were fruitless, so I figured I'd at least ask.
 

Battle[StFh]

New Member
Reaction score
6
You can make it a Periodic Event,

so for example:
Code:
Testerdetst
    Events
        Time - Every 3.00 seconds of game time
    Conditions
    Actions
        -------- Your Actions --------
 

BSJikan

New Member
Reaction score
5
Thank you, I couldn't exactly find that, I guess I wasn't looking hard enoguh. Thanks.
 

BSJikan

New Member
Reaction score
5
Considering it's been a while since this has been posted in, I got my first problem solved, but now I have a different one that I want to know about.

So, I have this thing set up to where the chat comes out over a units head instead of in the normal chat, but it still shows up in the normal chat. So, I was woundering what I overlooked in the terms of not making it show up in the normal chat.

Also, I set this up along-side the normal game. So that while people are playing the normal part of the game, and say you get defeated, you can type in a certain command, and that creates a Unit that dosen't attack and is invulnerable on a seperate island, away from everyone else. I want it so that anyone else who was defeated can be there, and those two can use a "." in front of what they want to say so that it comes out over said units head. But I also want them to be able to talk in the normal chat to the players who are still playing.

Ok, that's really confusing, but mabey someone will understand. If not, just ask me to restate it, and I'll try...
 

chovynz

We are all noobs! in different states of Noobism!
Reaction score
130
Use floating text. Remember to memory leak-proof it.

page 1

There are other mem leak post out there. Do a search. :)

[edit: Oh sorry. I re read your post and it already looks like you are using floating text. Are you able to post some code?
 

BSJikan

New Member
Reaction score
5
Yeah, give me a sec to start up WE and pull up the codes...
Code:
RP Talk
    Events
        Player - Player 1 (Red) types a chat message containing . as A substring
        Player - Player 2 (Blue) types a chat message containing . as A substring
        Player - Player 3 (Teal) types a chat message containing . as A substring
        Player - Player 4 (Purple) types a chat message containing . as A substring
        Player - Player 5 (Yellow) types a chat message containing . as A substring
        Player - Player 6 (Orange) types a chat message containing . as A substring
        Player - Player 7 (Green) types a chat message containing . as A substring
        Player - Player 8 (Pink) types a chat message containing . as A substring
        Player - Player 9 (Gray) types a chat message containing . as A substring
        Player - Player 10 (Light Blue) types a chat message containing . as A substring
        Player - Player 11 (Dark Green) types a chat message containing . as A substring
        Player - Player 12 (Brown) types a chat message containing . as A substring
    Conditions
        (Substring((Entered chat string), 1, 1)) Equal to .
    Actions
        Floating Text - Create floating text that reads ((|cffffcc00 + ((Name of (Triggering player)) + |r: )) + (Substring((Entered chat string), 2, 40))) above PlayerUnits[(Player number of (Triggering player))] with Z offset 0.00, using font size 8.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 5.00 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 towards 90.00 degrees

So what I thought this code would do when coupled with

Code:
RP Activate
    Events
        Player - Player 1 (Red) types a chat message containing -RPOn as An exact match
        Player - Player 2 (Blue) types a chat message containing -RPOn as An exact match
        Player - Player 3 (Teal) types a chat message containing -RPOn as An exact match
        Player - Player 4 (Purple) types a chat message containing -RPOn as An exact match
        Player - Player 5 (Yellow) types a chat message containing -RPOn as An exact match
        Player - Player 6 (Orange) types a chat message containing -RPOn as An exact match
        Player - Player 7 (Green) types a chat message containing -RPOn as An exact match
        Player - Player 8 (Pink) types a chat message containing -RPOn as An exact match
        Player - Player 9 (Gray) types a chat message containing -RPOn as An exact match
        Player - Player 10 (Light Blue) types a chat message containing -RPOn as An exact match
        Player - Player 11 (Dark Green) types a chat message containing -RPOn as An exact match
        Player - Player 12 (Brown) types a chat message containing -RPOn as An exact match
    Conditions
    Actions
        Unit - Create 1 RP Units for (Triggering player) at (Center of RP Start <gen>) facing Default building facing degrees
        Set PlayerUnits[1] = (Last created unit)
        Camera - Lock camera target for (Triggering player) to (Last created unit), offset by (0.00, 0.00) using Default rotation
        Selection - Select (Last created unit) for (Triggering player)

Would make the text apear above the created unit. But what happened, is the text started to appear above the wrong character. I was typing, and it appeared above my firend character, and his wouldn't show.

Next question is how do I make it so that the chat that they put with the "." in front dosen't show up in the normal chat window? I don't wnat to disable their chat all the way, only make it so that when there is a . in front it dosen't show up there.

And also,
Code:
RP Deactivate
    Events
        Unit - A unit enters RP End <gen>
    Conditions
    Actions
        Unit - Remove (Triggering unit) from the game
        Camera - Pan camera as necessary for (Owner of (Triggering unit)) to ((Owner of (Triggering unit)) start location) over 0.50 seconds
        Selection - Clear selection for (Owner of (Triggering unit))


I don't know what happened, but when my friend deactivated (using the code stated above) he booted me out of the game. So, I don't know what happened there.

This all happenedi n the same game, me getting booted when he left, my text above his head, and his dissapering. So could it of been his PC? Or is there something I'm missing.
 

Sim

Forum Administrator
Staff member
Reaction score
534
> Camera - Pan camera as necessary for (Owner of (Triggering unit)) to ((Owner of (Triggering unit)) start location) over 0.50 seconds

never use Pan Camera as necessary. Prolly bugs all the time, except in Single Player. It usually creates a desync, which mainly does exactly what you said happened ;)
 

BSJikan

New Member
Reaction score
5
That's good to know...

Well, then what do you suggest I do instead?

Could...
Code:
RP Deactivate
    Events
        Unit - A unit enters RP End <gen>
    Conditions
    Actions
        Unit - Remove (Triggering unit) from the game
        Camera - Pan camera for (Triggering player) to ((Triggering player) start location) over 0.00 seconds
        Selection - Clear selection for (Owner of (Triggering unit))
...be it?
 

Fr0zen

New Member
Reaction score
0
mm

Why in your "RP talk" trigger, do you have "Entered chat string as . " ?

You could also do this using boolean (to turn RP on and off), btw


Easy trigger,

Event - Map initilization
Conditions
Actions - Pick every player in all players and do actions
- Trigger - Add new event to (Your Trigger) picked player types blah as a substring


(much easier then typing em all) Trigger is a action type
 

BSJikan

New Member
Reaction score
5
I'm using it in the side. So that people who are either dead or just waiting to die, can just sit there for the rest of the game. I wanted them to have a place to trash talk without everyone else hearing.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top