- Joined
- Sep 5, 2015
- Messages
- 369
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)
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 [].
Made by our very own chieften