|
整个语段是这样的:
//--------------------------------------------------------------------------------------------------
// Trigger: PlayerDumps
//--------------------------------------------------------------------------------------------------
bool gt_PlayerDumps_Func (bool testConds, bool runActions) {
int auto2979DB24_ae;
int auto2979DB24_ai;
// Variable Declarations
int lv_playerIndex;
int lv_playersRemaining;
int lv_removeFromTeam;
// Variable Initialization
lv_playerIndex = 0;
lv_playersRemaining = 0;
lv_removeFromTeam = 0;
// Actions
if (!runActions) {
return true;
}
lv_playersRemaining = PlayerGroupCount(PlayerGroupAlliance(c_playerGroupAlly, EventPlayer()));
if ((lv_playersRemaining > 0) && (PlayerType(lv_playerIndex) != c_playerTypeReferee) && (PlayerType(lv_playerIndex) != c_playerTypeSpectator)) {
lv_removeFromTeam = (gv_mINERAL_COUNT[EventPlayer()] / lv_playersRemaining);
auto2979DB24_ae = 6;
auto2979DB24_ai = 1;
lv_playerIndex = 1;
while ((auto2979DB24_ai >= 0 && lv_playerIndex <= auto2979DB24_ae) || (auto2979DB24_ai <= 0 && lv_playerIndex >= auto2979DB24_ae)) {
if (((lv_playerIndex >= 1) && (lv_playerIndex <= 3))) {
PlayerModifyPropertyInt(lv_playerIndex, c_playerPropMinerals, c_playerPropOperSubtract, lv_removeFromTeam);
}
else if (((lv_playerIndex >= 4) && (lv_playerIndex <= 6))) {
PlayerModifyPropertyInt(lv_playerIndex, c_playerPropMinerals, c_playerPropOperSubtract, lv_removeFromTeam);
}
if (lv_playerIndex == auto2979DB24_ae) {
break;
}
lv_playerIndex = lv_playerIndex + auto2979DB24_ai;
}
}
else {
}
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_PlayerDumps_Init () {
gt_PlayerDumps = TriggerCreate("gt_PlayerDumps_Func");
TriggerAddEventPlayerLeft(gt_PlayerDumps, c_playerAny, c_gameResultUndecided);
}
还原尝试为:
[trigger]PlayerDumps
事件
玩家 -玩家任意玩家选择任意离开了游戏
局部变量
playerIndex = 0 <整数>
playersRemaining = 0 <整数>
removeFromTeam = 0 <整数>
条件
动作
变量 -设置playersRemaining = (在(玩家(进行触发的玩家) 的 盟友)中的玩家数)
综合 -If (条件) then do (动作) else do (动作)
If
And
条件
playersRemaining>0
(玩家playerIndex的控制者)!=裁判
(玩家playerIndex的控制者)!=观战者
Then
变量 -设置removeFromTeam = mINERAL_COUNT[((进行触发的玩家)/playersRemaining)]
变量 -设置playerIndex = 1
综合 -While (条件) are true, do (动作)
条件
Or
条件
And
条件
playerIndex<=1
And
条件
playerIndex>=1
动作
综合 -If (条件) then do multiple (动作)
If Then Else
综合 -Else if (条件) then do (动作)
Else If
And
条件
playerIndex>=1
playerIndex<=3
Then
玩家 -修改玩家playerIndex 晶体矿: 减去 removeFromTeam
综合 -Else if (条件) then do (动作)
Else If
And
条件
playerIndex>=4
playerIndex<=6
Then
玩家 -修改玩家playerIndex 晶体矿: 减去 removeFromTeam
综合 -If (条件) then do (动作) else do (动作)
If
playerIndex==
Then
综合 -中断
Else
Else
[/trigger]
但是不懂里面的auto2979DB24_ae和auto2979DB24_ai怎么来的。
求指点。 |
|