• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Forces in the Force Properties + JASS

Unfortunately, I don't think you can. The forces set in Scenario > Force Properties use a slightly different concept ("teams"), and are set up via generated code in your map's script (InitCustomTeams). The teams are represented by an integer which is determined by the order of your forces in that force properties window:
JASS:
// Sample InitCustomTeams with two forces:
//     Team 0: TestForceOne - Player 1 (Red)
//     Team 1: TestForceTwo - Player 2 (Blue), Player 3 (Teal)
function InitCustomTeams takes nothing returns nothing
    // Force: TRIGSTR_009
    call SetPlayerTeam( Player(0), 0 )

    // Force: TRIGSTR_010
    call SetPlayerTeam( Player(1), 1 )
    call SetPlayerTeam( Player(2), 1 )

    //   Allied
    call SetPlayerAllianceStateAllyBJ( Player(1), Player(2), true )
    call SetPlayerAllianceStateAllyBJ( Player(2), Player(1), true )

    //   Shared Vision
    call SetPlayerAllianceStateVisionBJ( Player(1), Player(2), true )
    call SetPlayerAllianceStateVisionBJ( Player(2), Player(1), true )

endfunction

They aren't exposed as force objects.

So your main options are:
  1. Create the forces manually and add the players (as you mentioned). This is the simplest, but will need to be updated any time you change the force properties manually.
  2. You could technically loop through the players, call GetPlayerTeam(<player>), and bucket them into corresponding forces.
 
Top