Interaction type: Difference between revisions

Jump to navigation Jump to search
Bounce top
(Bounce top)
Line 96: Line 96:
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’s InteractStatus is set to INTERACTED, Mario’s InteractObj and usedObj 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’s InteractStatus is set to INTERACTED, Mario’s InteractObj and usedObj attributes are set to the object, and Mario’s action is set so that he is in a cannon.
===Bounce Top===
===Bounce Top===
Mario will bounce on the object in question.
Bounce top is used for objects Mario can bounce off of such as Goombas. When an interaction between Mario and the object occurs, the game initializes a variable to store what kind of interaction occurred between Mario and the object. If Mario is wearing a metal cap, the variable is set to that of a fast attack. Otherwise, the game checks what sort of interaction occurred and sets the variable to that interaction. If the interaction is an attack, the game checks what kind of attack occurred, checks whether or not Mario should be bounced back from the attack, and then does further actions if the attack was Mario hitting the object from above. If Mario hit the object from above and the object is set to cause Mario to twirl, Mario’s vertical speed is set to 80, hit Y-position is set to be above the object’s hitbox, and his action is set to twirling. If Mario hit the object from above and the object is not set to make Mario twirl, Mario’s vertical speed is set to 30 and his Y-position is set to be above the object’s hitbox. If the interaction between Mario and the object was not an attack, then if the object is set to damage Mario and cause knockback, it does so. If the object’s interaction subtype is set to delay Mario’s invincibility timer going down while the interaction is occurring, it does so.


===Water Ring===
===Water Ring===

Navigation menu