AddScore(score amount)

From pinHeck Wiki
Jump to: navigation, search

Increment the currently active player's score by (score amount) and also updates the A/V processor with the new score value.

Example:

AddScore(1200300);

Increases [player] score by 1 million 200 thousand 300 ponts.


AddScore(x) also sets a "scoreBall" flag. Many games give you the ball back if you score 0 points on a ball. When the player scores anything, scoreBall is set to 1. This tells the drain logic that yes, the player scored something and thus they shouldn't get the ball back because of a 0 point ball. ScoreBall should be reset to 0 when a new ball/player is started.

There is also logic to see if the Replay Score has been reached. There is 1 flag per player so a player can only get this once per game. Please insert whatever custom SFX and video you would like to play upon a "Reply" in the AddScore function.