Interaction type: Difference between revisions

Jump to navigation Jump to search
no edit summary
mNo edit summary
No edit summary
Line 91: Line 91:
===Spiny===
===Spiny===
===Breakable Block===
===Breakable Block===
This interaction is used for breakable objects such as boxes. When the interaction occurs, the game checks to see which interaction occurred between Mario and the object. If the interaction was an attack, the game sets the object’s interaction status to the attack and determines how Mario should bounce back from the attack. If Mario is in the air, his forward speed is set to -16 units/frame. If Mario is not in the air his forward speed is set to -48 units/frame. In the case where Mario hits the object from above, Mario is sent upwards with a Y-velocity of 30 units/frame. In the case where Mario hits the object from below, Mario’s Y-velocity is set to 0 units/frame.
===Wind===
===Wind===
Used for when Mario is blown upward by strong wind. When the interaction occurs, the game checks Mario’s action to see if he is already blowing in the wind. If he is not, then Mario stops riding or holding any objects, Mario’s facing angle is set to the wind’s movement angle plus 180 degrees, his forward velocity is set to -24 units/frame, and his vertical velocity is set to 12 units/frame. A sound also plays and the camera is updated and Mario’s action is updated to reflect that he is blowing in the wind.
===Warp Door===
===Warp Door===
===Star/Key===
===Star/Key===
This interaction is used when Mario collects a Star or a Key. The interaction has two subtypes: NO_EXIT and GRAND_STAR. When the interaction occurs, a variable labelled StarGrabAction is set to STAR_DANCE_EXIT. Two variables are also set to check whether the object being interacted with has the NO_EXIT or GRAND_STAR subtype. If Mario’s health is at least 256, then Mario stops riding or holding any objects and then the game runs several checks to determine what animation to play. If the object is not of the type NO_EXIT, Mario’s hurt and heal counters are set to 0 and his cap timer is set to equal 1 if it is greater than 1. If the object is of the type NO_EXIT then the starGrabAction is set to STAR_DANCE_NO_EXIT. If Mario is swimming or is wearing the metal cap underwater, then starGrabAction is set to STAR_DANCE_WATER. If Mario is in the air starGrabAction is set to FALL_AFTER_STAR_GRAB. After these checks, the game spawns a smoke puff, sets the object’s InteractStatus to INTERACTED, and sets Mario’s interactObj and usedObj attributes to the object. Then, the game checks the object’s star index and updates Mario’s star count, if applicable. If the object is not of the type NO_EXIT, the level music is set to fade out. If the object is the Grand Star, Mario’s action is set to begin the Grand Star collection cutscene. Otherwise, Mario’s action is set to whatever starGrabAction was set to when the game checked each case.
This interaction is used when Mario collects a Star or a Key. The interaction has two subtypes: NO_EXIT and GRAND_STAR. When the interaction occurs, a variable labelled StarGrabAction is set to STAR_DANCE_EXIT. Two variables are also set to check whether the object being interacted with has the NO_EXIT or GRAND_STAR subtype. If Mario’s health is at least 256, then Mario stops riding or holding any objects and then the game runs several checks to determine what animation to play. If the object is not of the type NO_EXIT, Mario’s hurt and heal counters are set to 0 and his cap timer is set to equal 1 if it is greater than 1. If the object is of the type NO_EXIT then the starGrabAction is set to STAR_DANCE_NO_EXIT. If Mario is swimming or is wearing the metal cap underwater, then starGrabAction is set to STAR_DANCE_WATER. If Mario is in the air starGrabAction is set to FALL_AFTER_STAR_GRAB. After these checks, the game spawns a smoke puff, sets the object’s InteractStatus to INTERACTED, and sets Mario’s interactObj and usedObj attributes to the object. Then, the game checks the object’s star index and updates Mario’s star count, if applicable. If the object is not of the type NO_EXIT, the level music is set to fade out. If the object is the Grand Star, Mario’s action is set to begin the Grand Star collection cutscene. Otherwise, Mario’s action is set to whatever starGrabAction was set to when the game checked each case.
Line 104: Line 107:
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.
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===
Used for objects that set Mario on fire. If Mario is not invulnerable, not wearing a metal cap, not wearing a vanish cap, and not interacting with an object that delays the invincibility timer, the interaction proceeds. If Mario is swimming or if the distance between the water level at Mario’s current position and Mario’s current Y-position is greater than 50 (Mario is more than 50 units below the water level), a sound plays for putting a flame out. Otherwise, Mario’s burn timer is set to 0, the camera is updated, and a sound plays for Mario being set on fire. If Mario is in the air with a vertical speed less than or equal to 0, Mario’s action while burning is a burning fall. Otherwise, the action is a burning jump.
===Koopa Shell===
===Koopa Shell===
This interaction is used for the Koopa Shell Mario can ride. When the interaction occurs, first the game checks whether or not Mario is already riding a shell. If he is not, the game runs a function to determine what interaction occurred between Mario and the object. If the interaction with the object is Mario hitting it from above, or if Mario’s action is set to walking, Mario’s interactObj, usedObj, and riddenObj attritubes are set to the object, the game updates Mario’s sound and camera to reflect him riding the shell, the shell music begins, Mario drops any held objects, and Mario’s action is set to riding the shell.
This interaction is used for the Koopa Shell Mario can ride. When the interaction occurs, first the game checks whether or not Mario is already riding a shell. If he is not, the game runs a function to determine what interaction occurred between Mario and the object. If the interaction with the object is Mario hitting it from above, or if Mario’s action is set to walking, Mario’s interactObj, usedObj, and riddenObj attritubes are set to the object, the game updates Mario’s sound and camera to reflect him riding the shell, the shell music begins, Mario drops any held objects, and Mario’s action is set to riding the shell.
Line 115: Line 120:
This interaction is used for the Whirlpool in Dire, Dire Docks. When the interaction occurs, the game checks if Mario is already in the caught in whirlpool action. If Mario is not, Mario stops riding any object or holding any object if he is doing either of those things. Then, Mario’s forward velocity is set to 0, a sound effect plays, and Mario’s action is set to the caught in whirlpool action.
This interaction is used for the Whirlpool in Dire, Dire Docks. When the interaction occurs, the game checks if Mario is already in the caught in whirlpool action. If Mario is not, Mario stops riding any object or holding any object if he is doing either of those things. Then, Mario’s forward velocity is set to 0, a sound effect plays, and Mario’s action is set to the caught in whirlpool action.
===Clam/Bubba===
===Clam/Bubba===
This interaction is used for Clams, Unagi, and Bubba and has a subtype for if the object can eat Mario. When the interaction occurs, if the interaction has the can eat Mario subtype, Mario is eaten. Otherwise if Mario is in a state to take damage and knockback, he does so. If the object has the subtype that it delays the invincibility timer, it does so.
===BBH Entrance===
===BBH Entrance===
This interaction is used for the cage Mario jumps into to enter Big Boo’s Haunt. When the interaction occurs, first the game checks to see if Mario is already in the act of entering BBH. If he is not, Mario stops riding or holding any objects, the object’s InteractStatus is set to INTERACTED, and Mario’s InteractObj and usedObj attributes are set to the object. The game then sets Mario’s action depending on whether or not he is in the air. If Mario is in the air, Mario’s action is set so that he will spin into the BBH cage. If Mario is not in the air, his action is set so that he will jump into the BBH cage.
This interaction is used for the cage Mario jumps into to enter Big Boo’s Haunt. When the interaction occurs, first the game checks to see if Mario is already in the act of entering BBH. If he is not, Mario stops riding or holding any objects, the object’s InteractStatus is set to INTERACTED, and Mario’s InteractObj and usedObj attributes are set to the object. The game then sets Mario’s action depending on whether or not he is in the air. If Mario is in the air, Mario’s action is set so that he will spin into the BBH cage. If Mario is not in the air, his action is set so that he will jump into the BBH cage.

Navigation menu