As the title suggests, I am about to try reworking the auto-pickup of (fired/shot) ammunition
This is pretty much the last detail to be done for a v small Missile weapon /Projectile/Ammo asset pack Ive been working on
(I will eventually turn this thread into the asset pack link once all runs well)
I am firstly wondering if Anyone has already done this and is willing to share ideas/ provide hints... ??
(not asking for anyone to do this for me, just want to know if Im missing something important or obvious )
The way I see it being scripted...
SpoilerShow
onMove party hook >> iterate through all items on the square party is moving onto
>> check for Ammo item components (or if the item has "ammo" trait) >> if so....
>>check the item's ScriptComponent ("data") for a reference to champions ordinal ("champOrd")
- (ordinal info is passed to data when creating the normal non-enchanted converted item) -
if not "champOrd" then (it hasnt been fired/shot yet).... return
also check if the square has a floortrigger/pressure plate >> if so then.... return
if "champOrd" reference .....
>> check champs hands for normal non-enchanted Ammo >> if so AUTO PICKUP (into hands) and destroy ammo item
>> check champs hands for empty Hand slot + Missile weapon in other hand >> if so AUTO PICKUP (into hands) and destroy ammo item
>> if different Ammo in champs hand, check inventory for existing Stack of normal non-enchanted Ammo >> if so AUTO PICKUP (inventory) and destroy item
>> if no existing Stack in inventory and there is an empty slot >> AUTO PICKUP (inventory) ,destroy item and create new stack in backpack
AUTOPICKUP will involve some altered GUI stuff (maybe champ:showAttackResult() or drawGUI hook check) - I dont care if this is not exactly replicated
>> check for Ammo item components (or if the item has "ammo" trait) >> if so....
>>check the item's ScriptComponent ("data") for a reference to champions ordinal ("champOrd")
- (ordinal info is passed to data when creating the normal non-enchanted converted item) -
if not "champOrd" then (it hasnt been fired/shot yet).... return
also check if the square has a floortrigger/pressure plate >> if so then.... return
if "champOrd" reference .....
>> check champs hands for normal non-enchanted Ammo >> if so AUTO PICKUP (into hands) and destroy ammo item
>> check champs hands for empty Hand slot + Missile weapon in other hand >> if so AUTO PICKUP (into hands) and destroy ammo item
>> if different Ammo in champs hand, check inventory for existing Stack of normal non-enchanted Ammo >> if so AUTO PICKUP (inventory) and destroy item
>> if no existing Stack in inventory and there is an empty slot >> AUTO PICKUP (inventory) ,destroy item and create new stack in backpack
AUTOPICKUP will involve some altered GUI stuff (maybe champ:showAttackResult() or drawGUI hook check) - I dont care if this is not exactly replicated
(using 3 definitions - 1 for all 14 ammo items, 1 for their projectile versions and 1 for their hit effects)
But Im happy to share the code now if it helps context
Any help/guidance appreciated!