movetype_handler
An element that enables and disables movetype bitflags whenever the relative traits are added or removed. It also handles the +2/-2 pixel y anim loop typical of mobs possessing the FLYING or FLOATING movetypes. This element is necessary for the TRAIT_MOVE_ traits to work correctly, so make sure to attach this element before adding them to non-living movables.
Procs | |
on_movement_type_trait_gain | Called when a movement type trait is added to the movable. Enables the relative bitflag. |
---|---|
on_movement_type_trait_loss | Called when a movement type trait is removed from the movable. Disables the relative bitflag if it wasn't there in the compile-time bitfield. |
on_no_floating_anim_trait_gain | Called when the TRAIT_NO_FLOATING_ANIM trait is added to the movable. Stops it from bobbing up and down. |
on_no_floating_anim_trait_loss | Called when the TRAIT_NO_FLOATING_ANIM trait is removed from the mob. Restarts the bobbing animation. |
Proc Details
on_movement_type_trait_gain
Called when a movement type trait is added to the movable. Enables the relative bitflag.
on_movement_type_trait_loss
Called when a movement type trait is removed from the movable. Disables the relative bitflag if it wasn't there in the compile-time bitfield.
on_no_floating_anim_trait_gain
Called when the TRAIT_NO_FLOATING_ANIM trait is added to the movable. Stops it from bobbing up and down.
on_no_floating_anim_trait_loss
Called when the TRAIT_NO_FLOATING_ANIM trait is removed from the mob. Restarts the bobbing animation.