Grindel: Difference between revisions

Jump to navigation Jump to search
197 bytes added ,  12 October 2023
behav+ init + ref
(Referencing Horizontal Grindel behavior file)
(behav+ init + ref)
 
Line 4: Line 4:
|group=Surface
|group=Surface
|group2 = N/A
|group2 = N/A
|modelID=0x36
|tangibility=
|tangibility=
|draw=4000
|draw=4000
Line 18: Line 19:
|offset=
|offset=
|coins=
|coins=
|related=[[Thwomp]], [[Spindel]], [[Tox Box]]
|foundIn=[[Shifting Sand Land]]
|behaviorScript=[https://github.com/n64decomp/sm64/blob/master/data/behavior_data.c#L5836 Horizontal Grindel Initialization Script]
|behaviorCode=[https://github.com/n64decomp/sm64/blob/master/src/game/behaviors/horizontal_grindel.inc.c Horizontal Grindel Behavior File]
}}
}}
'''Grindel''' is an enemy appearing inside the Pyramid in [[Shifting Sand Land]]. It has two varieties: a vertically moving one which is identical to [[Thwomp]] in behavior and a horizontally moving one which jumps back and forth over a distance.
'''Grindel''' is an enemy appearing inside the Pyramid in [[Shifting Sand Land]]. It has two varieties: a vertically moving one which is identical to [[Thwomp]] in behavior and a horizontally moving one which jumps back and forth over a distance.
Line 27: Line 33:
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==
* [[Thwomp]]
* [[Spindel]]
* [[Tox Box]]


==References==
==References==
* [https://github.com/n64decomp/sm64/blob/master/src/game/behaviors/horizontal_grindel.inc.c Horizontal Grindel behavior file]
<references/>


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

edits

Navigation menu