blackhornet wrote:Here's a simple trick for scores:
Create a global variable: Score
Load your ten numbers (0to9) as sprite frames (name: ScoreSprite). Give your sprite an instance variable, 'index'. Place, let's say, four instances. Give the 'index' values 0 to 3. Use this line:
Every Tick -> ScoreSprite -> Set animation frame to int(mid(str(zeropad(Score, 4)), ScoreSprite.index, 1))
Zebbi wrote:... why is the score global passes to a text object first instead of directly to the sprite count?
Zebbi wrote:Is there a benefit to using this method over sprite fonts?
Users browsing this forum: No registered users and 3 guests