• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Player Trigger?

Status
Not open for further replies.
Level 2
Joined
Dec 13, 2015
Messages
17
So I don't really know what to do here and want some help, been runing in to this thing alot. Let's see if i can explain this in a good way
I have some triggers that when I select a unit a message pops up on the screen. But I want the message to just pop up for the player that has selected the unit, not everyone. Is the a trigger or something that can do this?:vw_wtf:
 
Level 12
Joined
May 22, 2015
Messages
1,051
So I don't really know what to do here and want some help, been runing in to this thing alot. Let's see if i can explain this in a good way
I have some triggers that when I select a unit a message pops up on the screen. But I want the message to just pop up for the player that has selected the unit, not everyone. Is the a trigger or something that can do this?:vw_wtf:

There should be a parameter in the display message action that allows you to choose which player group to display the message to. I know I have done this in GUI but it's been a long time since I looked at that. You might have to do some work to get it to make a player group of just the player who selected the unit, but it is possible for sure.

One thing to watch out for is that player groups leak. The way I dealt with this whole problem is I set up an array where each index (1 to 12) is a player group of just that player. Then I just use that array for this kind of thing. You use it like:
PlayerGroupArray[Player number of (Triggering player)]

I hope this makes sense for you.
 
Status
Not open for further replies.
Top