Yoshi: Difference between revisions

1,586 bytes added ,  14 June 2020
m
beheavior
m (beheavior)
Line 14: Line 14:
}}
}}
'''Yoshi''' is a minor character that appears on top of the castle after you have collected all 120 stars. After you talk to him, he will give you 100 lives and the [[Special Triple Jump|special triple jump]], then jump off of the roof and disappear.
'''Yoshi''' is a minor character that appears on top of the castle after you have collected all 120 stars. After you talk to him, he will give you 100 lives and the [[Special Triple Jump|special triple jump]], then jump off of the roof and disappear.
==Behavior==
Yoshi has four possible homes with x,z coordinates of (0, -5625) (-1364, -5912) (-1403, -4609) (-1004, -5308). These homes do not have a y value as Yoshi is not intended to go off the flat part of the castle roof. Yoshi is initialized with a gravity value of 2.0, a friction value of 0.9 and Buoyancy of 1.3. Yoshi walks with a forward velocity of 10 units/frame. Yoshi’s angle while walking approaches his target angle at 7.03125 degrees/frame. If Yoshi comes within 200 units of his home, Yoshi stops walking and idles. If Yoshi’s Y-position is below 2100, Yoshi is deactivated and set to respawn. When Yoshi idles, after 91 frames Yoshi will randomly choose a new home. Yoshi’s target angle is set to the inverse tangent of the difference between Yoshi’s current position and his new home and Yoshi begins walking again. When Mario talks to Yoshi, Yoshi turns toward Mario at 7.03125 degrees/frame if he is not facing him, Yoshi’s home is set to (-1364, -5912), and Yoshi is set to give Mario his present. When Yoshi gives Mario the present, Mario’s life counter increases until it hits 100, Mario gets his special triple jump and Mario is set to jump off the roof. When Yoshi jumps off the roof, Yoshi walks toward the point (-1364, -5912). When Yoshi gets close to that point, his angle is set to face away from the roof, his forward velocity is set to 50 units/frame and his Y-velocity is 40 units/frame. Then, Yoshi’s Y-velocity is decreased by 2 units/frame per frame and when his position is below 2100, the cutscene ends and Yoshi is deactivated.


==Glitches==
==Glitches==