Interaction type: Difference between revisions

Jump to navigation Jump to search
All types have been added.
No edit summary
(All types have been added.)
Line 96: Line 96:
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.
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===
 
Used for doors that take Mario to another area, like the doors to the basement and upstairs of the castle. When the interaction occurs, the game checks whether Mario is either walking or decelerating. If he is not, no further action is taken, if he is, the game proceeds with the rest of the interaction. If the door is the door to upstairs or door to the basement and Mario has not already unlocked it, the game checks if he has the right key for it. If he does not, the game displays text. If he does, Mario unlocks the door. If the door is not a locked door, the game decides whether Mario should push or pull the door open and then sends him through the warp. 
===Star/Key===
===Star/Key===
This interaction is used when Mario collects a Star or a Key. The interaction has two subtypes: the no exit subtype and the grand star subtype. When the interaction occurs, the action Mario is to perform is set to a star dance with an exit afterwards. 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 action Mario will perform is set to a star dance with no exit. If Mario is swimming or is wearing the metal cap underwater, then the action to be performed is set to the underwater star dance. If Mario is in the air the action is for Mario to fall and then do a star dance. After these checks, the game spawns a smoke puff, updates the object to reflect that it has been interacted with, and sets Mario’s interacted object and used object 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 no exit subtype, 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 action he was set to perform when the game checked each case.
This interaction is used when Mario collects a Star or a Key. The interaction has two subtypes: the no exit subtype and the grand star subtype. When the interaction occurs, the action Mario is to perform is set to a star dance with an exit afterwards. 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 action Mario will perform is set to a star dance with no exit. If Mario is swimming or is wearing the metal cap underwater, then the action to be performed is set to the underwater star dance. If Mario is in the air the action is for Mario to fall and then do a star dance. After these checks, the game spawns a smoke puff, updates the object to reflect that it has been interacted with, and sets Mario’s interacted object and used object 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 no exit subtype, 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 action he was set to perform when the game checked each case.
===Warp===
===Warp===
Used for fade in warps and pipes. When the interaction occurs, the game checks whether it is a fade warp or a pipe warp. If it is a fade warp, the game checks whether or not Mario has just faded in from the teleport. If he has not, and if he is idling, panting, standing against a wall of crouching, Mario is teleported via a fade out. If the warp is a pipe, and if Mario has not just emerged from the pipe, a sound plays, Mario stops holding or riding any objects, and Mario is warped via the pipe.
===Cannon Base===
===Cannon Base===
This interaction is used for Mario entering a cannon. When the interaction occurs, the game first checks to see if Mario is not already in a cannon. If he is not, Mario stops riding or holding any objects, the object is updated to reflect that it has been interacted with, Mario’s interacted object and used object attributes are set to the object, and Mario’s action is set so that he is in a cannon.
This interaction is used for Mario entering a cannon. When the interaction occurs, the game first checks to see if Mario is not already in a cannon. If he is not, Mario stops riding or holding any objects, the object is updated to reflect that it has been interacted with, Mario’s interacted object and used object attributes are set to the object, and Mario’s action is set so that he is in a cannon.
Line 114: Line 115:
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.
===Bounce Top/Bottom===
===Bounce Top/Bottom===
Used for enemies Mario can kill from below. When the interaction occurs, the game checks for which interaction occurred between Mario and the object. If the interaction was an attack by Mario, the object is bounced back. If the attack was from below, Mario’s vertical speed is set to 0. If the attack was from above, Mario bounces off the object either by twirling or by a regular bounce. Otherwise, if the interaction results in Mario taking knockback and damage, this occurs. If the interaction can freeze the invincibility countdown timer, it does so.
===Text===
===Text===
This interaction is used for objects that display text when Mario interacts with them. When the interaction occurs, the game determines which interaction subtype it is. If the interaction has the sign subtype, the game returns a function for Mario to read the sign. If the interaction subtype is the NPC subtype, the game returns a function for Mario to talk to the NPC. Otherwise, the game pushes Mario 2 units away from the object.  
This interaction is used for objects that display text when Mario interacts with them. When the interaction occurs, the game determines which interaction subtype it is. If the interaction has the sign subtype, the game returns a function for Mario to read the sign. If the interaction subtype is the NPC subtype, the game returns a function for Mario to talk to the NPC. Otherwise, the game pushes Mario 2 units away from the object.  

Navigation menu