Grindel: Difference between revisions

143 bytes added ,  8 May 2021
Referencing Horizontal Grindel behavior file
m (→‎See Also: List syntax)
(Referencing Horizontal Grindel behavior file)
Line 27: Line 27:
If Grindel’s target yaw is not equal to its current yaw, Grindel will rotate at 5.625 degrees per frame until it reaches its target yaw. During this process, Grindel’s timer attribute is set to 0 continuously. This is what is run to turn Grindel around over the course of 32 frames. 60 frames after the target yaw has been reached, if Grindel is more than 300 units from its home, Grindel’s target yaw is increased by 180 degrees, and Grindel’s distance to its home is set to 0, changing its home to its current position and causing it to begin turning toward its target yaw again. If Grindel is not more than 300 units from its home, Grindel’s jumping action begins. In this action, a sound effect is played, Grindel’s forward velocity is set to 11 units/frame, Gindel’s Y-velocity is set to 70 units/frame, Grindel’s gravity is set to -4, and Grindel’s move flags attribute is set to 0. When Grindel is in the air, Grindel’s attributes are updated to reflect that it has left the ground, and if Grindel’s Y-velocity is less than 0, its gravity is set to -16. Overall, it takes 28 frames for Grindel to complete a full jump, its jump peaks at 648 units off the ground, and it moves forward a total of 308 units.
If Grindel’s target yaw is not equal to its current yaw, Grindel will rotate at 5.625 degrees per frame until it reaches its target yaw. During this process, Grindel’s timer attribute is set to 0 continuously. This is what is run to turn Grindel around over the course of 32 frames. 60 frames after the target yaw has been reached, if Grindel is more than 300 units from its home, Grindel’s target yaw is increased by 180 degrees, and Grindel’s distance to its home is set to 0, changing its home to its current position and causing it to begin turning toward its target yaw again. If Grindel is not more than 300 units from its home, Grindel’s jumping action begins. In this action, a sound effect is played, Grindel’s forward velocity is set to 11 units/frame, Gindel’s Y-velocity is set to 70 units/frame, Grindel’s gravity is set to -4, and Grindel’s move flags attribute is set to 0. When Grindel is in the air, Grindel’s attributes are updated to reflect that it has left the ground, and if Grindel’s Y-velocity is less than 0, its gravity is set to -16. Overall, it takes 28 frames for Grindel to complete a full jump, its jump peaks at 648 units off the ground, and it moves forward a total of 308 units.


==See Also==
==See also==
* [[Thwomp]]
* [[Thwomp]]
* [[Spindel]]
* [[Spindel]]
* [[Tox Box]]
* [[Tox Box]]
==References==
* [https://github.com/n64decomp/sm64/blob/master/src/game/behaviors/horizontal_grindel.inc.c Horizontal Grindel behavior file]


[[Category:Enemies]]
[[Category:Enemies]]
{{objects}}
{{objects}}
217

edits