• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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