Powerup
Movable entitiessource
Derived types: AnkhPowerup, Backpack, KapalaPowerup, ParachutePowerup, TrueCrownPowerup
Methods
set_post_putting_off
function Powerup:set_post_putting_off(fun: fun(self: Entity?, who: PowerupCapable?)): integerfun:fun(self: Entity?, who: PowerupCapable?)
Returns integer
only for backpacks
sourceset_post_putting_on
function Powerup:set_post_putting_on(fun: fun(self: Entity?, who: PowerupCapable?)): integerfun:fun(self: Entity?, who: PowerupCapable?)
Returns integer
only for backpacks
sourceset_post_virtual
function Powerup:set_post_virtual(index: integer, fun: function): integer?index:integerfun:function- Callback signature not known from the code.
Returns integer? (may be nil)
set_pre_putting_off
function Powerup:set_pre_putting_off(fun: fun(self: Entity?, who: PowerupCapable?): boolean): integerfun:fun(self: Entity?, who: PowerupCapable?): boolean- Returning nil (or nothing): treated as false: the original function runs (true skips it).
Returns integer
only for backpacks
sourceset_pre_putting_on
function Powerup:set_pre_putting_on(fun: fun(self: Entity?, who: PowerupCapable?): boolean): integerfun:fun(self: Entity?, who: PowerupCapable?): boolean- Returning nil (or nothing): treated as false: the original function runs (true skips it).
Returns integer
only for backpacks
sourceset_pre_virtual
function Powerup:set_pre_virtual(index: integer, fun: function): integer?index:integerfun:function- Callback signature not known from the code.
Returns integer? (may be nil)