• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

"Player types a message" problem

Status
Not open for further replies.

RapeCoder

R

RapeCoder

I can not use a variable on " Player - <need the variable> types a chat message containing <my message> As exact match. "

I have a variable called Host (Type of variable = Player), but i can not use it on the above line of trigger, why ?

*Edit* : Sorry for the prefix, didn't read the announcement.
 
Last edited by a moderator:
Tirlititi's method is the most efficient, but there's also the alternative of using:
Player 1 enters a chat message containing "message" as an exact match.
Player 2 enters a....

etc. repeated to fill all 12 player slots. Then using the condition "Triggering Player equal to Host".
 
Create two trigger...

First, Create a trigger named "something", then put your desired actions there. Do not put any events there.

Second, Create a new trigger named "init" and put Map Initialization in event. And for actions, add "For Loop from 1 to 12 Do Actions" and Add "Add Event - Add Something<gen> an event : Player(Integer A) type "-command" as exact...
 
for all commands in your map just use 2 triggers
  • Map initialization 2
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Commands <gen> the event (Player - (Picked player) types a chat message containing - as A substring)
  • Commands
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 2, 8)) Equal to command
          • <Host> Equal to <Your Player>
        • Then - Actions
          • -------- you actions --------
        • Else - Actions
2,8 bacuse of "-" at beginning

Edit:
@Section,he does need to set Host variable on his own.....
 
Last edited:
Yea... ALiEN95 has cleared it all perfectly. But maybe it means like this?

  • Map initialization 2
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Host = <theHost>
      • Trigger - Add to Commands <gen> the event (Player - Host types a chat message containing - as A substring)
 
Status
Not open for further replies.
Back
Top