Skip to content
Discussion options

You must be logged in to vote

Alright, spent a little time looking into it... there are a couple different situations where we check if an extra life should be earned.

First is when a score object is created, Global.check_score_life is immediately called with the value of the score object.

Second is during the end of level score tally if you have either a time bonus or a ring bonus and those count up 100 at a time.

As for how this function works, it's...

func check_score_life(scoreAdd = 0):
	if fmod(score,50000) > fmod(score+scoreAdd,50000):
		life.play()
		lives += 1
		effectTheme.volume_db = -100
		music.volume_db = -100
		bossMusic.volume_db = -100

I'm finding the use of fmod instead of % here a little strange sin…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@QuartzTS
Comment options

@DimensionWarped
Comment options

@DimensionWarped
Comment options

Answer selected by QuartzTS
@QuartzTS
Comment options

@DimensionWarped
Comment options

@QuartzTS
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants