• 🏆 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!

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.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
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:
Level 37
Joined
Jul 22, 2015
Messages
3,485
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