what is 'Player Group' data type?

asipo

New Member
Reaction score
15
I create a Player Group variable called "MyTeam" using the GUI.
Thus this will become udg_MyTeam

Then I create a JASS code where I can to set the player alliance
Trigger:
  • Player Group - Make MyTeam treat MyTeam as an Ally with shared vision


But I done it using JASS, and the problem is this code didn't work
JASS:

local force temporaryGroup

call ForceAddPlayerSimple( Player(0), temporaryGroup )
call ForceAddPlayerSimple( Player(1), temporaryGroup )

call SetForceAllianceStateBJ( temporaryGroup, temporaryGroup, bj_ALLIANCE_ALLIED_VISION )


However, this trick works
JASS:

call ForceAddPlayerSimple( Player(0), udg_MyTeam )
call ForceAddPlayerSimple( Player(1), udg_MyTeam )

call SetForceAllianceStateBJ( udg_MyTeam, udg_MyTeam, bj_ALLIANCE_ALLIED_VISION )


So, I dont know what is the problem anymore.
The only thing I can see is I am declaring a wrong data type where force is not actually Player Group. But I am also kind of sure it is.

Anyone know what is the problem? why using the local variable didn't work?
 

Exide

I am amazingly focused right now!
Reaction score
448
You need to create the force.
Like this:

JASS:

local force f = CreateForce()
 

Exide

I am amazingly focused right now!
Reaction score
448
thanks ~~~ i know this problem is rather simple, but im new with jass

I don't blame you.
I forgot to add 'set i = i + 1' to my loop just now, and I was wondering why it was lagging like crazy. :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top