How to get player name???

CEMEHbl4

New Member
Reaction score
13
How to compare player name with a string?

I am in a shock right now, i cant find function to return player name!!!

How to get player name???

--------------------------
Transformed to (read the thread to see why (or go to Imdb PRO lol) ) :

How to compare player name with a string?
 

Im_On_56k

Hm...
Reaction score
116
PlayerName(1);

Returns the name for player 1.

Or in the GUI Player -> Player Name
Trigger:
  • Untitled Trigger 001
    • Events
      • Game - Map initialization
    • Local Variables
    • Conditions
    • Actions
      • UI - Display (Name of player 1 for (All players) to Subtitle area
 

CEMEHbl4

New Member
Reaction score
13
oke its work for actions... but i cant put it in condition! here is no text type , only text tag, wtf?

i need comparison "triggering player name equal to xxx"
 

Dave312

Censored for your safe viewing
Reaction score
269
I've only just started playing around with the editor but hopefully this will be of some help. You can reference the name of a player under the Text has been set condition (label = player). I haven't had any luck referencing it as a comparison though.

EDIT: Ok so I managed to create a GetPlayerName function which returns the players name. The problem is that because I had to set the return data type to text, I am unable to reference the function in a condition because it does not allow comparisons between the text data type. It does however allow comparisons between strings but I am currently unable to find a so way of converting a text to a string. Seems rather stupid since they should be pretty much the same thing.
 

ZugZugZealot

New Member
Reaction score
33
converting a text to a string. Seems rather stupid since they should be pretty much the same thing.

If text type is what I think it is, they're more different than you think. The way they work, text has the dynamics of a wide string, which is 16 to 32 bit per character while a regular string is 8 bit per character. char to wide is a lot more straight forward of a conversion than the other way around. Though "hard" isn't much of an excuse for a big company.
 

Dave312

Censored for your safe viewing
Reaction score
269
If text type is what I think it is, they're more different than you think. The way they work, text has the dynamics of a wide string, which is 16 to 32 bit per character while a regular string is 8 bit per character. char to wide is a lot more straight forward of a conversion than the other way around. Though "hard" isn't much of an excuse for a big company.

Is that the same as Unicode (16 bit) vs ASCII (8 bit)? Or is it meant to be more like a rich text thing? Either way you should be able to do some sort of comparison.
 

Inflicted

Currently inactive
Reaction score
63
conditions:
(Name of (Triggering player)) Equal to TheName ?

i think thats what your trying to say.

just set what I stated as TheName to a variable? um
 

CEMEHbl4

New Member
Reaction score
13
I am unable to reference the function in a condition because it does not allow comparisons between the text data type. It does however allow comparisons between strings but I am currently unable to find a so way of converting a text to a string. Seems rather stupid since they should be pretty much the same thing.

lol

i cant continue to develop my map, because of this problem! I stuck!!!

Retarded Blizzard...

and what should i do now? :banghead:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top