• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

How to use Player variable in events

Status
Not open for further replies.
Level 2
Joined
Jul 1, 2007
Messages
15
I used the tutorial from which the game found who is the host with a variable host now i want to make an event
like this

PLAYER - HOST TYPES A CHAT MESSAGE CONTAINS KICK AS A SUBSTRING.

which will make the whole trigger very easy but it doesn't allow me to use the variable HOST instead of player 1 red (i made the variable host - player type) if i manage to use the variable i will save a lot of writing but if i cant i must write lots of long triggers... so please help me.
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
Events
-PLAYER1 TYPES A CHAT MESSAGE CONTAINS KICK AS A SUBSTRING
-PLAYER2 TYPES A CHAT MESSAGE CONTAINS KICK AS A SUBSTRING
-PLAYER3 TYPES A CHAT MESSAGE CONTAINS KICK AS A SUBSTRING
-PLAYER4 TYPES A CHAT MESSAGE CONTAINS KICK AS A SUBSTRING
etc. etc.
Conditions:
-Triggering player equal to HOST
Actions:
-what ever.....
 
Level 6
Joined
Mar 2, 2006
Messages
306
add an event to a finished eventless trigger once you know who the host is:

  • Events
    • (trigger where you initialized host var)
  • Actions
    • Custom Script: set udg_HostPlayer = gethost() //or whatever
    • Trigger - Add [color=blue] HostPlayer types a chat message containing kick as a substring[/color] to KickingTrigger
 
Status
Not open for further replies.
Top