biell / alti-server

Altitude game server wrapper
The Unlicense
13 stars 3 forks source link

[Question] PowerupPickup vs PowerupAutoUse #32

Closed kevATin closed 4 years ago

kevATin commented 4 years ago

What is the difference between these two, and how do they work exactly? Does the later only apply to Health?

biell commented 4 years ago

Yes, Health is the only auto-use. To give you an idea about what I think of them being different log entries, here is my code for auto-use:

    'powerupAutoUse'    => sub {
         $HOOKS{'powerupPickup'}->(@_);
    },

I literally just send the powerupAutoUse event and player to the powerupPickup hook, and deal with both log entries in the same hook.