Jump to content
Sign in to follow this  
Myn

Getting player names in MP

Recommended Posts

Hey guys,

Once again sorry for what may be a very noobish question; I did try searching for this but with no luck.

I'm trying to get the name of a player when they enter a trigger. In SP I can use

name vehicle player

but in MP this doesn't work, and I'm out of ideas on what to try. If anyone knows how I might be able to do this in MP, I'd greatly appreciate it.

On a sidenote, I'm wondering if there's a way to set the same action (for lack of a better word) to multiple units; at the moment I have a trigger with the activation set for:

aone playMove "AmovPercMstpSnonWnonDnon_Ease";atwo playMove "AmovPercMstpSnonWnonDnon_Ease";athree etc...

but I'd like to know if I can have it apply to all players within the trigger without having to declare each one individually.

Thanks in advance to all responses :)

Myn

Share this post


Link to post
Share on other sites

for everyone within the trigger ?

well, use this:

{_x playMove "AmovPercMstpSnonWnonDnon_Ease"} forEach thisList

or for everyone in a group it would be:

{_x playMove "AmovPercMstpSnonWnonDnon_Ease"} forEach units group this

Share this post


Link to post
Share on other sites

Aah..thanks, will give it a go :) Still mainly looking for help with the first one too.

Share this post


Link to post
Share on other sites

well the "name" command gives you the name of just about anything. However, "player" always returns the player on the computer where the command was executed.

What exactly are you trying to do ?

Share this post


Link to post
Share on other sites

When a player enters the trigger area, a hint should be displayed saying, for example, "Myn has entered the range." In SP this works fine, but for MP it should be able to give the name of whichever player enters the trigger area.

Share this post


Link to post
Share on other sites

I see.

Hmmmm, try this in the activation:

{if (isplayer _x) then {hint format ["%1 has entered the range.",name _x]};} forEach thisList

Share this post


Link to post
Share on other sites

Thanks, will have a look :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×