Page 1 of 1

A little question

Posted: 19 Apr 2015, 16:12
by Guerro323
Hello all, I want to know how to force a team or a player to capture a checkpoint then they can capture a gate then they can capture a goal.
Cordially, guerro :yes:

Re: A little question

Posted: 23 Apr 2015, 13:16
by Eole
You're question is quite broad. You're almost asking us to write the whole game mode script in your stead. ^^
You should try to write your mode and divide the big question into smaller problems. Then see what you can do and what you can't. You can check the script of Siege to see how it works, the logic behind the unlocking of the gates is quite similar to what you want to do. You'll also probably have to create a custom map type.

Re: A little question

Posted: 02 May 2015, 10:50
by Guerro323
I don't want that anyone write the script for me, I just want to know how to manage the capture between the goal or checkpoint or gate.
Because when I use this :

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;
    }
}
( That I found on the documentation ), I just want to know how to obligate for player to capture a checkpoint for exemple and not a pole. :?:

Re: A little question

Posted: 02 May 2015, 15:21
by djhubertus
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.

Re: A little question

Posted: 02 May 2015, 15:29
by Guerro323
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.
The tag is "Checkpoint"?

Re: A little question

Posted: 02 May 2015, 21:36
by djhubertus
Yep, checkpoint is default.