#4.1 Enemies: Blob
The Blob is one of the enemies in GB Space Jup. It crawls back and forth in a fixed area and damages the player when he touches it. You can kill the blob by jumping on it.
If the local variable $Blob_dead ==0, so if the blob is still alive, the on hit script determines whether the player is above the blob when he touches it. If this is the case, the blob's sprite changes to a squishy blob and $Blob_dead is set to 1, so the player can still touch the squishy blob while it is still on the screen without the player taking any damage.
In fact, if the player touches the blob from the sides while it is still alive, it loses an upgrade level by decrementing $Player_Upgrade by one and then the game runs the player upgrade script. In addition, the variable $Player_hit is set from 0 to 1, which prevents the player from being hit several times in a row. Only after the hit animation in the battery counter actor has run and has given the player a few seconds of reaction time, $Player_hit is reset there again. In addition, the local variable $Blob_direction changes so that the blob crawls away from the player.
Like the batteries and lootboxes, the blob, like all other enemies, is reset to its initial state by reloading the scene.
Its movement script is in its on upgrade function. Depending on the variable state of $Blob_direction, it crawls either to the left or to the right.
If the blob reaches the defined turning point or touches the player, $Blob_direction changes and the blob continues to crawl in the other direction.
If the blob is hit by a laser projectile of the player, which belongs to collision group 3, $Blob_dead is set to 1 and the actor is hidden. The blob is defeated.
Get GB Space Jump -2.0
GB Space Jump -2.0
A Super Mario clone prototype in GB Studio 2.
More posts
- #3.1 Upgrades: PowerupsApr 08, 2022
- #3.3 Upgrades: Attack ScriptApr 08, 2022
- #2.1: UI: Battery CountApr 08, 2022
- #5.5 Scenes: Abyss and JetpackApr 08, 2022
- #3.2 Upgrades: Upgrade ScriptApr 08, 2022
- #2.2: UI: Upgrade DisplayApr 08, 2022
- #4.2 Enemies: RobotApr 08, 2022
- #4.3 Enemies: WormApr 08, 2022
- #5.1 Scenes: GeneralApr 08, 2022
Leave a comment
Log in with itch.io to leave a comment.