Cordially, guerro

Moderator: English Moderator
Code: Select all
foreach(Pole in BlockPoles) {
foreach(PlayerId in Pole.Sector.PlayersIds) {
declare Player <=> Players[PlayerId];
if(Player == Null) {
continue;
} else {
Pole.Gauge.Speed = 1;
Pole.Gauge.Max = 3000;
Pole.Captured = True;
if (Pole.Gauge.Value == Pole.Gauge.Max) {
Player.Score.Points += 1;
MB_StopRound = True;
Message::SendBigMessage(TextLib::Compose("$<%1$> has loaded the Pole!", Player.Name), 4000, 10);
break;
}
}
}
if (Pole.Sector.PlayersIds.count == 0) {
Pole.Gauge.Speed = 0;
Pole.Gauge.Value = 0;
Pole.Captured = False;
}
}
The tag is "Checkpoint"?djhubertus wrote:Create global variable that will store state number, for example:
0 - no captures
1 - Captured checkpoint
2 - Captured gate
3 - Captured Pole
and then, check, is next goal should be active by comparing variable to specific state.
EDIT: Checkpoint is also a pole so you need to check objects via name tags.
Users browsing this forum: No registered users and 2 guests