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

[JASS] GetConvertedPlayerId()

Status
Not open for further replies.
Level 4
Joined
May 4, 2008
Messages
113
I have some GUI triggers and some JASS triggers. Global variables have been set which use arrays 1, 2, 3 and 4 for players 1, 2, 3, 4.

I understand that when doing something like the following action:
Code:
Set MyVar[Player number of (Owner of (Triggering unit))] = 1
in GUI, the 'player number of owner of triggering unit' if the player was player 1 would be 0, and so it uses "GetConvertedPlayerId" to change it to 1.

My question is, if I am setting the SAME global variable in a JASS trigger, do I have to add that 1 to the array value, or do I just use "GetPlayerId" and it will work?

Hope that makes sense. Thanks in advance.
 
Status
Not open for further replies.
Top