SetLeaguePerformance
Network
League
5.5 OC
bool
int
score
New player or scenario score
int
player_id
ID of player whose score shall be set. If not given, global performance for all players is set.
Sets the league score. This function can be used for custom scenario scoring in competition or adventure leagues.
Use GetPlayerID() to get the ID of a joined player.
#appendto Rock
static g_rocks_collected;
func Entrance(clonk)
{
var plr = clonk->GetController();
if (clonk->GetID() == Clonk && plr != NO_OWNER)
{
++g_rocks_collected;
Log("%s found a rock! Score: %d", GetTaggedPlayerName(plr), g_rocks_collected);
SetLeaguePerformance(g_rocks_collected);
return RemoveObject();
}
return _inherited(clonk, ...);
}
Rock script modification: Whenever a rock is collected by a Clonk, the score of all players is increased.
SetLeagueProgressDataGetLeagueScore
Sven22014-04