ローカルテストでチーム戦

 ローカルでテストすると、Team分けが有効にならずにFFAになってしまう。ロビーを通してないのが原因と思われるが、簡単な対処法はまだ知らない。

 ちなみに、SC2をそのまま起動した場合、Editorからローカルテストが起動できない。Editor経由で起動したSC2は、ゲームを落とさない限りは何度でもローカルテストできる。ただ、この場合Window modeがfull screenかwindowに固定されるので、Window(full screen)とかにしてる人はいちいち設定しなおす必要がある。また、grafic設定もEditorの設定が反映されてしまう。

 他、ログインした状態でローカルテストすると、リプレイが記録されるので便利。テストプレイだけ回しておいて、あとでリプレイチェックすれば楽。

Triggers Moduleでチーム戦を設定

 まず、下準備としてPlayer Propertiesで、player controllをComputerにしておく(自分も遊びたいならplayer 1だけuserに)。また、Start Locationを割り振っておく。Team Placementが反映されないので、チーム戦には必須。

  • ※Publish時にはこれらの設定は元に戻しておく必要がある。

 次に、Triggers Moduleを使って、それぞれのPlayerに、お互いのAlliance設定と、視野の共有化を行う。これは、個々のplayerについて設定する必要があるので、4人チームだと、player 1を2〜4に味方設定、player 2を3〜4に味方設定、player 3を4に味方設定しなければならない。この辺はwhole等を使えばok。

  • ※1と2、2と3が味方、でも1と3は敵の場合、2の陣内で1と3が戦闘を始めるけど2はthruな状況が発生する。

 publish時は、each picked player〜の部分をdisableしておけば良いだけ。

Triggers Module - ローカルテストでチーム戦

  • ※Player PropertiesでStart Locationを設定しておくこと。

Melee Initialization
Events
Game - Map initialization
Local Variables
team = 0
J = 0
I = 0
Conditions
Actions
Melee - Set melee starting resources for all players
Melee - Create melee starting units for all players
Melee - Start the melee AI for all computer players
Melee - Set default melee options for all players
Variable - Set I = 1
General - While (Conditions) are true, do (Actions)
Conditions
I <= 5
Actions
Variable - Set team[1] = (I + 1)
Variable - Set team[2] = (I + 2)
Variable - Set team[3] = (I + 3)
Variable - Set team[4] = (I + 4)
Variable - Set J = 1
General - While (Conditions) are true, do (Actions)
Conditions
J <= 4
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
team[J] > 5
Then
Variable - Set team[J] = (team[J] - 5)
Else
Variable - Set J = (J + 1)
Variable - Set J = 1
General - While (Conditions) are true, do (Actions)
Conditions
J <= 4
Actions
Player - Make player I and player team[J] treat each other as Ally With Shared Vision, Control, And Spending
Player - Make player (I + 5) and player (team[J] + 5) treat each other as Ally With Shared Vision
Variable - Set J = (J + 1)
Variable - Set I = (I + 1)