Pizza Tower/Unused Code/Unused Enemy Code
This is a sub-page of Pizza Tower/Unused Code.
This article is a work in progress. ...Well, all the articles here are, in a way. But this one moreso, and the article may contain incomplete information and editor's notes. |
To do: Maybe format this on an enemy-by-enemy basis, with another section for code that was for all of them? |
Global
scr_ragecheck
Although this script is empty, its code can be found in the Western Build v3 source code. It would have been used to check enemies should use their rage attacks. The code was moved to each enemy's Step event by the April 2021 build so that enemies could have different conditions for when to use the attacks, but that code was also removed by the Eggplant Build before the Heat/Rage mechanic was removed entirely.
"heavy" Variable
A variable that if set to 1, it will make the enemy more... well, heavier. When the player picks it up, they will carry the enemy slower and jump lower. This was never used in the final game, however it was used for things like the junk seen in the Boss build.
"hp" Variable
Each enemy has an variable called "hp", being for a health point system. This variable was used in the 2018 builds and early 2019 builds when enemies took multiple hits to kill, but was removed later that year when enemies were made to take a single hit to kill instead. The variable was temporarily put back into use in late 2020 and early 2021 when McPig reworked Pizza Tower's gameplay to be a bit more combat focused, but this was reverted before the April 2021 Build due to negative reception from fans, leaving the variable unused once again. Every enemy still has this variable defined, but it's ignored and enemies die instantly when hit regardless of their current HP.
"elitehp" Variable
Like the previous variable, this variable was meant to be used by enemies for their HP, but this time specifically when the Heat Meter was at the highest level it could be. This variable goes unused for the same reason as the hp variable.
Unused Toppin Monster Code
All Toppin Monsters but the Pineapple one have unused code left over from the April 2021 and Rework Builds, when Don't Make a Sound was more labyrinthian and the monsters roamed the level freely.
Note that the rooms seen in the video (besides the bit in Don't Make a Sound) are custom rooms made for showing the states.
Mushroom/Cheese/Sausage Toppin Monsters
These monsters all share the same states due to the Mushroom Monster object being a parent for the Cheese and Sausage Monster objects.
states.robotroaming
In this state, monsters will walk in a straight line until they meet a wall, at which point they'll turn around and continue walking. If it's facing the nearest player and the player is within 300 pixels of its x coordinate, it'll start chasing the player, which notably doesn't run the script that sets the background and music normally used when the monsters start chasing the player. This state calls scr_monster_detect_audio, showing that the monster was supposed to be able to enter the robotinvestigate state, but it no longer will due to missing code.
states.robotseeking
In this state, monsters will walk very fast until it reaches a wall, which sets it back to states.robotroaming. If it sees the nearest player, it'll start chasing them. Other than the code that allows the monsters to break plugs, this state isn't referenced by any other code.
states.robotinvestigate
This state normally crashes the game due to it needing a variable called "investigatestate", which was removed from the toppin monsters' creation code. Re-adding the variable fixes this crash. If investigatestate is set to 0 or 1, the monster starts running. Once it hits a wall, investigatestate switches to 2, which makes the monster run for a bit longer before stopping, idling for a couple seconds, placing a mushroom patroller, and returning to roaming. If the monster sees the player at any time, they'll immediately start chasing the player. Oddly, the variable for how long the monster should idle before placing a patroller isn't reset, causing it to place one instantly every time it tries to idle again. Despite this code being intended for use by the Cheese and Sausage Monsters too, they both switch to the mushroom monster's sprites while in this state, which is odd since the monsters have variables assigned to them to use the correct sprites and avoid issues like this.
scr_monster_detect_audio
This script depends on another script called "scr_monster_audio_check" to return true to function, which is impossible due to the script being empty. If the script could return true, the monster running this script would enter the robotinvestigate state if it's offscreen, or start chasing the player if it's onscreen.
scr_monster_audio_check
As mentioned previously, this script is empty, but it does actually have code in the Eggplant Build. The code from that build reveals that script would have returned true if the sound effects for either hitting the ground after a groundpound or the original Fireass transformation scream were playing. This code was removed when the game switched over to using FMOD Studio for its sound, as all audio files were removed from the game's files and therefore any code referencing those audio files would cause crashes.
Tomato Toppin Monster
states.robotroaming
In this state, the monster appears in the background and slowly moves downwards, before then moving upwards and offscreen. Once it's 100 pixels outside of the camera's view, it'll start chasing the player. However, if the player is touching an unused object called obj_puppetsafezone, it'll instead enter its idle state.
Grandpa Pepper Transformation Defeat
As mentioned here, the Grandpa Pepper used to be killable by the player, with them either being the Ghost or Knight to achieve this. The transformation defeats are leftovers from the Eggplant and April 2021 builds respectively. The object's Destroy code reflects this, as the code to check if the player is in either transformation still remains.