• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Any Player Types This Message

Status
Not open for further replies.
Do it for each player:
  • Player - Player 1 (Red) types a chat message....
  • Player - Player 2 (Blue) types a chat message...
  • Player - Player 3 (Teal) types a chat message...
Or, you can also just make a trigger and add the events in a loop on map initialization, eg:
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to Some Trigger <gen> the event (Player - (Player((Integer A))) types a chat message containing -Talents as An exact match)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
The player who typed the message will be returned as "Triggering Player".
 
Hmm... I've heard of handle-stack corruption but I never experienced it, nor heard much information about when it occurs/what happens when it occurs. :\

I've tried manipulating all the data, even after it was destroyed, and it seemed to work fine. I've seen people have huge rpg's and stuff where they did destroy triggers, and I never encountered any errors or problems, so I'll assume it is safe, unless I see some sort of test map or something showing it. ;P
 
For efficency, you should only add the event to players who are actually human and playing at the time the trigger is created. Anything else wastes resources.

A simple function could be made to do this hopefully. It would basically take the same parameters as the current event without the player slot (as it itterates through all human active players instead).
 
Status
Not open for further replies.
Back
Top