Page 2 of 2

Re: Catching the checkpoint event does not work (for me)

Posted: 17 Jan 2014, 14:57
by Eole
One way to know if a player crossed a checkpoint directly from a Manialink script without communicating directly with the server would be to do something like that:

Code: Select all

<script><!--
main() {
  while (True) {
    yield;
    if (!PageIsVisible || InputPlayer == Null) continue;

    foreach (Player in Players) {
      declare PrevCheckpointCount for Player = -1;
      if (PrevCheckpointCount != Player.CurRace.Checkpoints.count) {
        PrevCheckpointCount = Player.CurRace.Checkpoints.count;

        // A player crossed a checkpoint, do something now !
      }
    }
  }
}
--></script>

Re: Catching the checkpoint event does not work (for me)

Posted: 17 Jan 2014, 18:29
by undef.de
Eole wrote:One way to know if a player crossed a checkpoint directly from a Manialink script without communicating directly with the server would be to do something like that:
Yes... it works and was all i need! 1000x THANKS dude! :thx: