Pb with BigMessage duration [Solved]
Posted: 15 Mar 2016, 14:40
Hi all,
I'm writing a new gameMode for TrackMania, and I have a little problem with BigMessage duration :
I want to display a message like this : Round 1/4 at the begining of the round,
I've set duration to 5000 ms but this message isn't cleared after 5 second, it stays in the middle of the screen until another message is written upon it ...
here is a piece of my code :
Have I made a mistake ?
It was working fine when my script was extending RoundBase.Script, but since I've rewritten it so that it's an extend of BaseMde.script, it doesn't work anymore ...
thanks for help =)
I'm writing a new gameMode for TrackMania, and I have a little problem with BigMessage duration :
I want to display a message like this : Round 1/4 at the begining of the round,
I've set duration to 5000 ms but this message isn't cleared after 5 second, it stays in the middle of the screen until another message is written upon it ...
here is a piece of my code :
Code: Select all
***PlayLoop***
***
foreach (Event in PendingEvents) {
PassOn(Event);
XmlRpc::PassOn(Event);
// ----------------------------- //
// Send Message to players at round start (ex : Round 1/3)
// ----------------------------- //
if (Event.Type == CTmModeEvent::EType::StartLine) {
if (G_RoundNb < S_RoundsPerMap) {
Message::SendBigMessage(Event.Player, TextLib::Compose(_("$s$F80Round %1 / %2"), TextLib::ToText(G_RoundNb), TextLib::ToText(S_RoundsPerMap)), 5000, 10);
} else if (G_RoundNb == S_RoundsPerMap) {
Message::SendBigMessage(Event.Player, "$s$F80Last Round", 5000, 10);
}
}
}
***
It was working fine when my script was extending RoundBase.Script, but since I've rewritten it so that it's an extend of BaseMde.script, it doesn't work anymore ...
thanks for help =)