[fixed] Blobs will void out properly #1976
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Status
Description
Fixes #1925
This PR does changes to some blobs to make them void out properly.
I think the void should be like a very deep "nothing", so blobs should not randomly break apart or explode when touching the void.
It doesn't seem like there is any conventional way of telling if a blob has voided out. The condition
this.getPosition().y > map.tilemapheight * map.tilesize
seems to work well so I added a new scriptVoid.as
with the functionisVoidedOut()
with that condition. The script was then added to some blobs to prevent unwanted stuff from happening when voided.Since bomb's, keg's and waterbomb's
Sparkle.ogg
andWaterSparkle.gg
"emit sound effect" would abruptly end when voiding, I added sound effects"SparkleFade.ogg
andWaterSparkleFade.ogg
which are played by those blobs viasprite.PlaySound()
when voiding out to give the impression the blobs are actually falling down into the "nothing".Tested in offline and online, no problems.
Although I know there is an issue with arrows touching and getting stuck on the void, I didn't encounter it in testing in offline and online. So I couldn't test if this PR fixes that.
Steps to Test or Reproduce
Throw exploding waterbomb, bomb, keg or shoot waterarrow or throw waterbucket, crate or chest into a void.
Notice they will explode, splash or break apart.
After this PR, they won't