Merry-Go-Round: Difference between revisions
(Created page with "{{object_infobox_2 |title= Merry-Go-Round |image= STROOP- Merry-Go-Round.png |group= Surface |group2 = |tangibility= 2000 |draw= |gravity= |friction= |buoyancy= |interaction=...") |
(No difference)
|
Revision as of 05:28, 6 March 2020
Merry-Go-Round | |
Technical Constants | |
Object Group | Surface |
Tangibility Radius | 2000 |
The Merry-Go-Round is an object in the level Big Boo's Haunt. It features prominently in the star Ride Big Boo's Merry-Go-Round.
Behavior
The Merry-Go-Round behavior consists of two functions, one of which is to handle playing music, and the other of which handles the rest of its behavior. The game checks whether or not the Merry-Go-Round music should play, plays it if it should, and if not, does not play it and checks whether it should. If the music should not play, the game checks if Mario’s current room is near the Merry-Go-Round. If it is, the game plays the Merry-Go-Round music and BBH music at the same time and sets a variable that the Merry-Go-Round music should play. If the Merry-Go-Round music should play, the game goes through steps to check if it should continue to play. The game gets Mario’s floor and the floor’s surface type. If Mario’s floor is null, the floor type is set to 0. Otherwise, the floor type is obtained directly from Mario’s current floor. Then, the game checks if Mario is on the Merry-Go-Round platform or if Mario’s current floor has type 0x1A (used for the Merry-Go-Round). If either of these conditions are met, the game plays only the Merry-Go-Round music and sets a variable that Mario is on the Merry-Go-Round. Otherwise, the game plays both the Merry-Go-Round and BBH music and the variable for whether Mario is on the Merry-Go-Round is set to false. The game also has a check for whether or not Mario is in the Merry-Go-Round area of the basement. If Mario’s current room is not the Merry-Go-Round room, and his current room is not near the Merry-Go-Round room, the game goes back to playing the BBH music and sets that the Merry-Go-Round music should not play. If this check is not satisfied, the game plays the sound of the Merry-Go-Round creaking. The Merry-Go-Round’s other function has two purposes: to play the howling wind sound and to move the Merry-Go-Round. The Merry-Go-Round object has an attribute for whether or not Mario is in the outside area of BBH. If this is set to false, the game checks whether Mario is in the outside area or not. If he is, the attribute is set to true. If the attribute is set to true, the sound of howling wind plays. Within the code that occurs when Mario is set to outside, if Mario’s current room is not the outside area of BBH and Mario’s room is not the Merry-Go-Round room, the Merry-Go-Round attribute for whether Mario is outside is set to false. For the movement, if the Merry-Go-Round should not be stopped, the Merry-Go-Rounds Angular Yaw Velocity is set to 128 angular units (~.00195 degrees), and this value is added to the Merry-Go-Round’s moving angle and facing angle every frame, and the Merry-Go-Round music function is run. If the Merry-Go-Round should be stopped, the Angular Yaw Velocity is set to 0 and the music switches back to the BBH music.