Sushi: Difference between revisions

From Ukikipedia
Jump to navigation Jump to search
m (Bolding title in lead, moving categories to bottom)
(Reference to behavior file)
 
Line 24: Line 24:
==Behavior==
==Behavior==
Every frame Sushi’s X-position is set to a value equal to the sum of the X-position of its home and 1700 times the Sine of its current angle. Its Z-position is set to a value equal to the sum of the Z-position of its home and the Cosine of its current angle. Sushi’s Y-position is set to the sum of the position of the water level at its current location, the Y-position of its home and 200 times the Sine of its current angle. This makes Sushi move in a circle of radius 1700 and oscillate up and down by 200 units. Sushi’s movement angle is set to the sum of its current angle and 90 degrees while its current angle is increased by .7 degrees. If the difference between Mario’s current Y-position and the water level at Sushi’s current position is greater than -500, and the difference between Sushi’s current Y-position and the water level at Sushi’s position is greater than -200, a trailing wave is spawned behind Sushi. Every 16 frames, Sushi plays a sound.
Every frame Sushi’s X-position is set to a value equal to the sum of the X-position of its home and 1700 times the Sine of its current angle. Its Z-position is set to a value equal to the sum of the Z-position of its home and the Cosine of its current angle. Sushi’s Y-position is set to the sum of the position of the water level at its current location, the Y-position of its home and 200 times the Sine of its current angle. This makes Sushi move in a circle of radius 1700 and oscillate up and down by 200 units. Sushi’s movement angle is set to the sum of its current angle and 90 degrees while its current angle is increased by .7 degrees. If the difference between Mario’s current Y-position and the water level at Sushi’s current position is greater than -500, and the difference between Sushi’s current Y-position and the water level at Sushi’s position is greater than -200, a trailing wave is spawned behind Sushi. Every 16 frames, Sushi plays a sound.
==References==
* [https://github.com/n64decomp/sm64/blob/master/src/game/behaviors/sushi.inc.c Sushi behavior file]


{{objects}}
{{objects}}

Latest revision as of 22:52, 8 May 2021

Sushi
STROOP- Sushi.png
Technical Constants
Object Group General Actor
Actor Group Group 13
Hitbox
Interaction Type Damage
Damage 3
Radius 100
Height 50
Down Offset 50

Sushi is a shark-like enemy appearing only in the first area of Dire, Dire Docks. They do not directly attack Mario, but Mario will take damage should he collide with them.

Behavior

Every frame Sushi’s X-position is set to a value equal to the sum of the X-position of its home and 1700 times the Sine of its current angle. Its Z-position is set to a value equal to the sum of the Z-position of its home and the Cosine of its current angle. Sushi’s Y-position is set to the sum of the position of the water level at its current location, the Y-position of its home and 200 times the Sine of its current angle. This makes Sushi move in a circle of radius 1700 and oscillate up and down by 200 units. Sushi’s movement angle is set to the sum of its current angle and 90 degrees while its current angle is increased by .7 degrees. If the difference between Mario’s current Y-position and the water level at Sushi’s current position is greater than -500, and the difference between Sushi’s current Y-position and the water level at Sushi’s position is greater than -200, a trailing wave is spawned behind Sushi. Every 16 frames, Sushi plays a sound.

References