SetScore(which player)

From pinHeck Wiki
Revision as of 21:55, 21 September 2014 by Benheck (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Tells the A/V processor what the current player's score is. This is typically used by the AddScore(x) command.

At the beginning or end of a game you will want to use SetScore(x) to clear all the player scores.

Example:

playerScore[1] = 0; //Set player 1's score to 0 (internal PIC32 value) SetScore(1); //Update player 1's score on the A/V processor

The Propeller A/V processor does not share variables with the PIC32. Therefore, if something changes on the PIC32, it needs to update the A/V processor about it.