Hello,
I'm working on a spear throw that is based off the Bow and Arrow items. I have it that the Spear (Bow) is always in the player's inventory but does not show in the UI. I have this all working where I can pick up a spear (ammo) and then equip the spear (bow) and then throw it (using a unique substate in the animator (duplicated bow substate with changed values and animations)).
1: Is there any way to have the spear (bow) only equippable when they have an ammo count of 1 or more and then automatically unquip when the ammo count is 0?
Don't mind having to write some code to do this but if you could tell me how you would approach it I would be most appreciative.
2: Noticing a weird behaviour I can't put my finger on, hoping you might have some insight. When I throw the spear and the Spear(ammo) is projected, it instantiates a Pickup item. The first time that the item is instantiated it is done so correctly. However, the second time I pick it up and throw it the the item collection is blank.
First Instantiation Second Instantiation
Any Idea why this would be? I tried in the demo UCC/UIS scene and added a spawnable item to the arrow and it works correctly. S obviously this is something with my set up, just hoping maybe you have an idea of why this might be.
Once again, thank you.
Nathan
I'm working on a spear throw that is based off the Bow and Arrow items. I have it that the Spear (Bow) is always in the player's inventory but does not show in the UI. I have this all working where I can pick up a spear (ammo) and then equip the spear (bow) and then throw it (using a unique substate in the animator (duplicated bow substate with changed values and animations)).
1: Is there any way to have the spear (bow) only equippable when they have an ammo count of 1 or more and then automatically unquip when the ammo count is 0?
Don't mind having to write some code to do this but if you could tell me how you would approach it I would be most appreciative.
2: Noticing a weird behaviour I can't put my finger on, hoping you might have some insight. When I throw the spear and the Spear(ammo) is projected, it instantiates a Pickup item. The first time that the item is instantiated it is done so correctly. However, the second time I pick it up and throw it the the item collection is blank.
First Instantiation Second Instantiation
Any Idea why this would be? I tried in the demo UCC/UIS scene and added a spawnable item to the arrow and it works correctly. S obviously this is something with my set up, just hoping maybe you have an idea of why this might be.
Once again, thank you.
Nathan
Last edited: