Event - Player X(?) types a chat message

staind25

TH.net Regular
Reaction score
7
Is there a way to make it so that the event "Player types a chat message" can be a variable player? That way, I'd be able to do the same actions regardless of what player it was, and it would make it so I wouldn't have to copy/paste the event for 10 players (So tedious!!).

I've tried converting the player to player index, then having an integer variable, but it won't let me use this variable in the event. I've also tried the same with a "player" variable...same result. Any way to get around this?

Thanks much! Let me know if anything's unclear.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Events must be static, you cannot have variable events. But you can put various events into a single trigger so you dont have to create multiple triggers, just one.

You can add events to a trigger via a GUI action ingame though. This way you can do for example:
Code:
Pick each player and do
 add event "(picked player) types chat message" to some_trigger
end loop
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top