REPENTOGON icon indicating copy to clipboard operation
REPENTOGON copied to clipboard

EntityPlayer:CollectPickup(player, pickup)

Open guwahavel opened this issue 2 years ago • 5 comments

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

guwahavel avatar Mar 30 '23 01:03 guwahavel

I believe this is solved by Entity:ForceCollide, but let's get some feedback first

namishere avatar Sep 11 '23 08:09 namishere

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

BrakeDude avatar Oct 04 '24 06:10 BrakeDude

Here are any callbacks when the player tries to Pickup a Collectible? I mean before playing the pickup animation.

caoli5288 avatar Nov 20 '24 21:11 caoli5288

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

BrakeDude avatar Nov 21 '24 04:11 BrakeDude

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.

caoli5288 avatar Nov 24 '24 14:11 caoli5288