EntityPlayer:CollectPickup(player, pickup)
Ability for player to attempt to collect any pickup at range like how Forgotten Bone Club/Spirit Sword can
If the Collision callback is not used, should have its own callback so modded pickups can be hooked into it
I believe this is solved by Entity:ForceCollide, but let's get some feedback first
I think it should have own callback/function because Entity:ForceCollide triggers collision callbacks. EntityPlayer::CollectPickup(player, pickup) should force collect by playing apropriate animation depending if it pickup is shop item or not and maybe even ignore collision callbacks all together. That also by idea should eliminate problem with restock since there's no function i know that restocks pickups with apropriate cost. Although CustomHealthAPI's TriggerRestock exists it's still a hacky workaround. And also EntityPlayer::CollectPickup(player, pickup) should return boolean value as a check if collecting was succesfull. But then again there are things like if it was collected by player or bag of crafting. Small things like that but i hope there a few of them
Here are any callbacks when the player tries to Pickup a Collectible? I mean before playing the pickup animation.
Here are any callbacks when the player tries to Pickup a Collectible? I mean before playing the pickup animation.
To my knowledge, no. If we not counting collision callbacks
Here are any callbacks when the player tries to Pickup a Collectible? I mean before playing the pickup animation.
To my knowledge, no. If we not counting collision callbacks
I think this is useful, otherwise we would have to check a bunch of states in collision callbacks to determine if this collision will trigger a pickup.