Amp

From Ukikipedia
Revision as of 11:42, 28 September 2024 by Kate Aces (talk | contribs) (minor #cww)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Amp
STROOP- Amp.png
Technical Constants
Object Group General Actor
Actor Group Common 0
Model ID 0xC2
Tangibility Radius 1000
Hitbox
Interaction Type Shocks
Damage 1
Radius 40
Height 50
Down Offset 40
Code
Initialization Behavior Script [1]
Behavior Code [2]

Amp is an enemy that appears in many levels. There are two types of Amp; a homing Amp, and an Amp that moves in a circle. The circling Amp can also be stationary if the circle's radius is set to 0. When Mario collides with an Amp, he is shocked and takes 1 damage.

Locations

The following courses have Amps. All of them only have Circling Amps unless stated otherwise:

Behavior

Homing Amp

Homing Amp is initialized at its home with a gravity value of 0, friction of 1 and buoyancy of 1. The Amp’s Y-value sinusoidally oscillates 40 units around its average Y-value, which is initialized as the Y-value of the Amp’s home. Homing Amp starts at 1/10th of its normal size and is invisible to Mario. When Mario gets within 800 units of the Homing Amp’s home, the Amp will begin to appear. The Amp grows over the course of 30 frames, increasing in size by 0.1 units for one frame and then by 0.03 units for each frame after. At the end of the 30 frames, the Amp is at 97% of its final size. Once an additional 61 frames have passed, the Amp grows to its final size and begins to chase Mario. If Mario is within 11.25 degrees of the Amp’s line of sight, the Amp “locks on” and chases Mario in a straight line at 15 units/second for 32 frames. During this period, the Amp’s average Y-value is adjusted to align with Mario’s head (precisely Mario’s graphical position + 150 units). If the Amp is not locked on to Mario, the Amp moves forward at 10 units/second while turning toward Mario. In this case, the Amp’s average Y-value is set to move towards Mario’s graphical position + 250 units. If Mario goes further than 1500 units from the Amp’s home, the Amp will move forward for another 152 frames and then reset to its original home in its initial state.

Circling Amp

The Circling Amp can be initialized with 4 different radii: 200 units, 300 units, 400 units and 0 units. If the Amp has a circling radius of 0 units, the amp remains in a fixed position while turning toward Mario and oscillating 40 units around its initial Y-value. If the Amp’s circling radius is not 0, it moves in a circle of the specified radius around its home with a period of 64 frames and oscillates 60 units around its initial Y-value.

References