giveMapObjective beta
Function of @v12-engine/engine
ts
export declare function giveMapObjective(world: World, id: string, options?: {
players?: readonly PlayerId[];
params?: Message['params'];
progress?: {
value: number;
max: number;
};
}): ObjectiveState[];Gives players an objective of the map's, by its id (MapObjective): those given by a rule (at: 'rule'), when the rules say. To every player a person plays when players is left out (mapObjectivePlayers); a player who has it already keeps theirs. Its words' params and its progress go with it, as world.objectives.add. Throws for an id the map does not have: an id in the code that is not on the map is a mistake