• 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.

Just a little reminder with triggers please

Status
Not open for further replies.
Level 9
Joined
Sep 5, 2015
Messages
369
296n5uu.png



how to change "player 1" so that any player can choose it and it will show the message for the respected player that chose.
 
Use [TRIGGER][/TRIGGER] tags when you're posting triggers. It's way more convienent for everyone. This should also be moved to the Triggers & Scripts forum :3

To answer your question, there is sadly no "Generic player" event in the trigger editor. You will have to add all the players that you want to trigger the event.

From what I can see, you just want to display text that will only visible to the player who selects the unit. This is an extremely easy trigger, but will require some variables.

  • Selection
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Your unit
    • Actions
      • Set PlayerVariable = (Triggering player)
      • Set PlayerGroup = (Player group(PlayerVariable))
      • Game - Display to PlayerGroup the text: Your Text
      • Custom script: call DestroyForce(udg_PlayerGroup)
 
Last edited:
Level 9
Joined
Sep 5, 2015
Messages
369
Use [TRIGGER][/TRIGGER] tags when you're posting triggers. It's way more convienent for everyone. This should also be moved to the Triggers & Scripts forum :3

To answer your question, there is sadly no "Generic player" event in the trigger editor. You will have to add all the players that you want to trigger the event.

From what I can see, you just want to display text that will only visible to the player who selects the unit. This is an extremely easy trigger, but will require some variables.

  • Selection
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Your unit
    • Actions
      • Set PlayerVariable = (Triggering player)
      • Set PlayerGroup = (Player group(PlayerVariable))
      • Game - Display to PlayerGroup the text: Your Text
      • Custom script: call DestroyForce(udg_PlayerGroup)

holy damn. thanks lol. i know everyone on here is "all about learning" or whatever, but what are those variables arrays, variable types, etc.?
 
Last edited:
Variable types specify what kind of data you will be storing into that variable. For example, an integer variable only lets you store integers into it.
  • PlayerVariable = player variable type
  • PlayerGroup = player group variable type

Variable arrays let you store multiple data into that variable. In this case, none of the variables I showed you in the example are arrays because arrays are indicated by brackets [].
 
Level 9
Joined
Sep 5, 2015
Messages
369
Variable types specify what kind of data you will be storing into that variable. For example, an integer variable only lets you store integers into it.
  • PlayerVariable = player variable type
  • PlayerGroup = player group variable type

Variable arrays let you store multiple data into that variable. In this case, none of the variables I showed you in the example are arrays because arrays are indicated by brackets [].

im a little confused with the arrays. can you explain further or link me to a guide? i understand the types, just the arrays that fuck with my brains.
 
Status
Not open for further replies.
Top