solo scripts
Posted: 16 May 2013, 12:44
I was trying "invasion" title pack the other day and noticed that we didn't get actual medals.
so you should know you can do something like this in the solo script to give medals:
You can also do this in the maptype script, that will run the mode when clicking on the green flag, to help testing:
so you should know you can do something like this in the solo script to give medals:
Code: Select all
{
declare metadata Integer ObjectiveAuthor for Map;
declare metadata Integer ObjectiveGold for Map;
declare metadata Integer ObjectiveSilver for Map;
declare metadata Integer ObjectiveBronze for Map;
declare metadata Integer RaceCheckpoints for Map;
if (_Time <= ObjectiveAuthor)
Solo_SetNewRecord(_Score, ::EMedal::Author);
else if (_Time <= ObjectiveGold)
Solo_SetNewRecord(_Score, ::EMedal::Gold);
else if (_Time <= ObjectiveSilver)
Solo_SetNewRecord(_Score, ::EMedal::Silver);
else if (_Time <= ObjectiveBronze)
Solo_SetNewRecord(_Score, ::EMedal::Bronze);
else
Solo_SetNewRecord(_Score, ::EMedal::Finished);
}
You can also do this in the maptype script, that will run the mode when clicking on the green flag, to help testing:
Code: Select all
.....
if(Event.Type == CPluginEvent::Type::StartValidation) {
StartTestMapWithMode("mymode.Script.txt");
wait(!IsSwitchedToPlayground);
}
....