Interaction type: Difference between revisions

Jump to navigation Jump to search
Added Door, Coin and Water Ring
(Added details for Hoot and Grabbable interactions. Started on Door interaction.)
(Added Door, Coin and Water Ring)
Line 72: Line 72:
==Description==
==Description==
===Hoot===
===Hoot===
The Hoot interaction is used by Hoot, the Owl that Mario can hold on to in Whomp's Fortress. This interaction first checks whether Mario is in a suitable state to grab the owl (fulfilled by several airborne states) and checks if the global timer has advanced more than 30 ticks since Mario last let go of Hoot. If both these conditions are met, Mario can grab onto Hoot. Note that since the global timer advances while the game is paused, it is possible to fulfill the second condition right after Mario lets go of Hoot by simply pausing the game for 30 frames.
The Hoot interaction is used by Hoot, the Owl that Mario can hold on to in Whomp's Fortress. This interaction first checks whether Mario is in a suitable state to grab the owl (fulfilled by several airborne states) and checks if the global timer has advanced more than 30 ticks since Mario last let go of Hoot. If both these conditions are met, Mario can grab onto Hoot. Note that since the global timer advances while the game is paused, it is possible to fulfill the second condition right after Mario lets go of Hoot by simply pausing the game for 30 frames. Since the Hoot interaction is the first interaction type internally, and is referenced by the Beta Boo Key and Bowser actors, it is possible that this interaction was repurposed from an earlier type of interaction that was used earlier in development.
===Grabbable===
===Grabbable===
The Grabbable interaction is used by objects which are grabbable, such as Bob-Ombs and Boxes. This interaction has 5 subtypes: INT_SUBTYPE_GRABS_MARIO which is used by Chuckya and King Bob-Omb and also makes the object heavy, INT_SUBTYPE_HOLDABLE_NPC which lets Mario drop the object gently with no forward velocity, INT_SUBTYPE_DROP_IMMEDIATELY which is used by grabbable NPCs that also talk to Mario so that Mario will drop them when their dialogue is finished, INT_SUBTYPE_KICKABLE for objects that can be kicked and INT_SUBTYPE_NOT_GRABBABLE which is used by Heave-Ho to prevent Mario from picking it up. For the grab to occur, Mario must not be kicking an object of subtype kickable, the object must not have the not grabbable subtype, and the able_to_grab_object condition must be met. If the object being interacted with is not Bowser, the interaction is also set to push Mario 5 units away from the object when he grabs it.
The Grabbable interaction is used by objects which are grabbable, such as Bob-Ombs and Boxes. This interaction has 5 subtypes: INT_SUBTYPE_GRABS_MARIO which is used by Chuckya and King Bob-Omb and also makes the object heavy, INT_SUBTYPE_HOLDABLE_NPC which lets Mario drop the object gently with no forward velocity, INT_SUBTYPE_DROP_IMMEDIATELY which is used by grabbable NPCs that also talk to Mario so that Mario will drop them when their dialogue is finished, INT_SUBTYPE_KICKABLE for objects that can be kicked and INT_SUBTYPE_NOT_GRABBABLE which is used by Heave-Ho to prevent Mario from picking it up. For the grab to occur, Mario must not be kicking an object of subtype kickable, the object must not have the not grabbable subtype, and the able_to_grab_object condition must be met. If the object being interacted with is not Bowser, the interaction is also set to push Mario 5 units away from the object when he grabs it.
===Door===
===Door===
The Door interaction is used for doors and has a subtype used for Star Doors.  
The Door interaction is used for doors and has a subtype used for Star Doors. When Mario interacts with a door, the game checks to make sure he is walking or decelerating before checking if he has enough stars to open it. If these conditions are met, the game initializes variables for whether to push or pull the door open and a variable for the door’s flag in the save file. If the door Mario interacts with is a regular door, then at this point Mario will either push or pull the door open. If the door Mario interacts with is a star door, a separate check is done and a different action is done for Mario to enter the star door. If the door requires stars to open, the game also runs a check for whether or not the door has been opened before in the save file. If it has not, the game runs an action where Mario uses the power of the stars to open the door. If Mario does not have the required stars, the game displays dialogue dependent on how many stars are required to open the door. In the case where the door requires 70 stars to open, the game displays dialogue and then allows Mario to open the door.
===Hurtbox 1 & 2===
===Hurtbox 1 & 2===
Hurtbox 1 & 2 are identical with their behavior. If Mario makes contact with an object, it will simply knock him back and generally hurt him. Some examples include [[Chain Chomp]], [[Mr. Blizzard]], and [[bullet bill]]s.
Hurtbox 1 & 2 are identical with their behavior. If Mario makes contact with an object, it will simply knock him back and generally hurt him. Some examples include [[Chain Chomp]], [[Mr. Blizzard]], and [[bullet bill]]s.
Line 82: Line 82:
The only distinction between the two is solely based on what file they are in.
The only distinction between the two is solely based on what file they are in.
===Coin===
===Coin===
This interaction is used for collecting coins, as the name implies. When the interaction occurs, the number of coins Mario has is increased by the value of the coin, his heal counter is increased by 4 times the value of the coin, and the coin’s interaction status is updated to mark that an interaction has occurred. If the course is a main course, the number of coins Mario has minus the value of the coin is less than 100, and Mario has at least 100 coins, the 100 coin star spawns.
===Cap===
===Cap===
===Pole===
===Pole===
Line 94: Line 95:
===Bounce Top===
===Bounce Top===
===Water Ring===
===Water Ring===
This interaction is used by water rings like those spawned by the Manta Ray in Dire, Dire Docks and Air Bubbles in Dire, Dire Docks and Jolly Roger Bay. When the interaction occurs, Mario’s heal counter is increased by 4 times the object’s “coin” value and the object’s interaction status is updated to mark that an interaction has occurred.
===Bully===
===Bully===
===Burns===
===Burns===

Navigation menu