Skip to content

Goals script functions

Functions for C# (Cb.Call) and Python (cb.call). See Script functions for how to use them.

goals.addPoints

Adds points to a goal, or takes them away with a negative number.

Value What to put in
goal Optional. The goal's name. Leave it out for the first goal.
points How many points.
useMultiplier Optional. true to use the goal's multiplier.

Gives back: The points really added.

var answer = await Cb.Call("goals.addPoints", new { goal = "Emote ladder", points = 5 });
answer = cb.call("goals.addPoints", goal="Emote ladder", points=5)

goals.get

Gives you a goal: its points, steps and settings.

Value What to put in
goal Optional. The goal's name. Leave it out for the first goal.

Gives back: An object with id, name, points, steps (each with name and points, lowest first), reachedThrough (the highest step already announced), multiplier, resetOnNewStream and values, or null when there is no such goal.

var answer = await Cb.Call("goals.get", new { goal = "Emote ladder" });
answer = cb.call("goals.get", goal="Emote ladder")

goals.list

Gives you every goal.

Gives back: A list of goals, each like goals.get gives.

var answer = await Cb.Call("goals.list");
answer = cb.call("goals.list")

goals.reset

Puts a goal back to 0 points, so every step can be reached again.

Value What to put in
goal Optional. The goal's name. Leave it out for the first goal.

Gives back: true.

var answer = await Cb.Call("goals.reset");
answer = cb.call("goals.reset")

goals.setMultiplier

Changes how much event points count. Points already added do not change.

Value What to put in
goal Optional. The goal's name. Leave it out for the first goal.
multiplier 2 = double, 1 = normal, 0.5 = half.

Gives back: true.

var answer = await Cb.Call("goals.setMultiplier", new { multiplier = 0.5 });
answer = cb.call("goals.setMultiplier", multiplier=0.5)

goals.setPoints

Sets a goal's points.

Value What to put in
goal Optional. The goal's name. Leave it out for the first goal.
points The new number of points.

Gives back: true.

var answer = await Cb.Call("goals.setPoints", new { points = 0 });
answer = cb.call("goals.setPoints", points=0)