|
Post by rasto61 on Oct 7, 2018 14:13:45 GMT
I think that erorr you posted you just need to restart the unity editor. I get something similar sometimes, its something in Inventory Pro when you delete items from the database I think. Can you enter play? ok, I rebuild my scene with the most default settings and I have no errors. (Except I still can't use populator. I saw a lot of guys with the similar issues on the DevDog discord, so I suppose it's a problem on the populator side).I have working Pistol and not working ammo. I can set ammo amount directly on weapon prefab (without having any ammo in inventory), and it will shoot until zero. I can pick up the ammo item from the ground but it have no influence on weapon at all. So, I can't shoot and can't reload. PS. Anyway, I think I could write a custom ammo manager to solve this issue. But I need your help with a Bow equip to left hand. Is it possible to add a LeftHand_Shooter equipment, or how it should be solved? Oh, that's right, I am using a custom collection populator, that's why the populator works. You just need to make it so that it adds the items after the inventory player and all collections have been initialized. But this is outside of the integration. Yes, you can just create a LeftHand_Shooter and then set the appropriate restrictions and use that for the bow. So I have uploaded the version that now lets you visually position the item in the hand. And made some changes to the vAmmoManager_InventoryPro, so see if it works now.
|
|
|
Post by nfighter on Oct 7, 2018 20:52:34 GMT
Yes, you can just create a LeftHand_Shooter and then set the appropriate restrictions and use that for the bow. So I have uploaded the version that now lets you visually position the item in the hand. And made some changes to the vAmmoManager_InventoryPro, so see if it works now. Great! Thanks for your effort! Are you sure there is nothing were hardcoded about left and right hands? I create a LeftHand_Shooter and made a bow with exactly the same procedure as a handgun, but I get error UnassignedReferenceException: The variable leftWeapon of InvectorEquipmentHandler has not been assigned.
UPD. It's not about the bow. I can't equip anything to the left hand with the same error UPD 2. Oh, I install the new integration version (and restart Unity to be sure IP got all the stuff right) and now it works!!! I can wear weapons in both hands and my ammo works! Not exactly as intended, but it's a huge step forward. Thank you very much! So the ammo don't work right from the inventory. Now when I picking up ammo - it updating the vAmmoManager and will fire that amount of ammo I got picked up. It still ignore the ammo from the inventory. Keep us posted with the features updates!
|
|
|
Post by rasto61 on Oct 8, 2018 5:53:25 GMT
It's definitely working, I can pickup ammo, shoot and it reloads as far as I have ammo in the inventory.
We need to figure out what you set up incorrectly.
Are you sure the weapon you are using has the same ammoID on it as the ammoID on the standaloneAmmo? Also make sure you did not accidentally leave the old vAmmoManager on the player.
|
|
|
Post by nfighter on Oct 8, 2018 19:47:36 GMT
It's definitely working, I can pickup ammo, shoot and it reloads as far as I have ammo in the inventory. We need to figure out what you set up incorrectly. Are you sure the weapon you are using has the same ammoID on it as the ammoID on the standaloneAmmo? Also make sure you did not accidentally leave the old vAmmoManager on the player. Sure. I have the equal ID and only one new vAmmoManager. It almost works, but not exactly as it should. I record a small video (with commentary in subtitles), so maybe it will show everything better than my text explanation.
|
|
|
Post by rasto61 on Oct 9, 2018 6:12:45 GMT
Yes, that's kind of weird.
So when you have ammo in the inventory but 0 in the gun, you either have to Reload by pressing a key, or setting the 'Auto Reload' on the weapon to true. Otherwise it won't automatically reload and use the inventory ammo. (That's for when you had the ammo in the inventory but the weapon did not shoot)
And then; what is your setup of the AmmoTrigger? (Components on itself and children) (That's for when you pickup the ammo and it lets you shoot a few shots without reloading)
You don't need to keep looking at the ammo manager, it takes the ammo count from the inventory pro, but its not serialized, so its not going to show properly in the inspector, but that's ok since you should check the ammo count in the inventory.
|
|
|
Post by nfighter on Oct 9, 2018 12:56:44 GMT
Yes, that's kind of weird. So when you have ammo in the inventory but 0 in the gun, you either have to Reload by pressing a key, or setting the 'Auto Reload' on the weapon to true. Otherwise it won't automatically reload and use the inventory ammo. (That's for when you had the ammo in the inventory but the weapon did not shoot) And then; what is your setup of the AmmoTrigger? (Components on itself and children) (That's for when you pickup the ammo and it lets you shoot a few shots without reloading) My weapon set to "Auto Reload", but I have tested it with manual reload. It works exactly as shooting — I need to trigger the ammo first, and then I'll be able shooting or reload. Without manual picking of the first ammo - it doesn't see the ammo in inventory. That's my ammo object.
|
|
|
Post by rasto61 on Oct 11, 2018 7:25:13 GMT
And how are you picking up the ammo?
|
|
|
Post by nfighter on Oct 11, 2018 19:08:34 GMT
And how are you picking up the ammo? I have AutoPick-Up enabled in IP settings. So when I touch the item trigger IP place it to my inventory.
|
|
|
Post by rasto61 on Oct 14, 2018 7:34:38 GMT
And how are you picking up the ammo? I have AutoPick-Up enabled in IP settings. So when I touch the item trigger IP place it to my inventory. Then I'm not completely sure where the problem is. I have this working properly. Though I will probably be changing stuff over the next month as I work with this more after I do some other projects, so that might resolve this.
|
|
|
Post by shadex on Oct 28, 2018 4:17:45 GMT
I have AutoPick-Up enabled in IP settings. So when I touch the item trigger IP place it to my inventory. Then I'm not completely sure where the problem is. I have this working properly. Though I will probably be changing stuff over the next month as I work with this more after I do some other projects, so that might resolve this. Didn't you say you had a custom collection populator? Taking a wild guess here, but is it dealing with the ammo? Seems his problem is pick up, which collection population handles? Only been working with IP for the past week or so, so i could be wrong.
|
|
|
Post by shadex on Oct 29, 2018 20:58:04 GMT
It's definitely working, I can pickup ammo, shoot and it reloads as far as I have ammo in the inventory. We need to figure out what you set up incorrectly. Are you sure the weapon you are using has the same ammoID on it as the ammoID on the standaloneAmmo? Also make sure you did not accidentally leave the old vAmmoManager on the player. I'm having the exact same problem he is. I can pick up Invector Pickup Ammo and it will recognize it in vAmmoManager_InventoryPro, though it's not reading Inventory Pro's ammo. I get a "can't use till <timestamp>" error whenever i try to "use" the item in the inventory.
It looks like It's using IP to equip the weapon, but everything else is using Invector's standalone components. The Ammo item in Inventory Pro does nothing, and does not effect the ammo for the gun (no way to add the bullets to the clip, or read the bullets).
Also Duel wielding does not work. It's the same as sickscores was. The EquipHandler treats every weapon as rightHanded, so the melee manager can not execute any leftHanded code. This means whenever a weapon is equiped, it sets the attackID, and when unequiped it removes the AttackID. So if you equip both weapons, and remove either weapon, the attackID gets set to 0. Going to take a look at the EquipHandler and see if i can fix it. If anyone has solved this, please let me know, would love to know the answer. The hard part is that inventory pro has no way to tell the melee manager which slot it is equiping the weapon from, since it only see's the weapon catagory. You would have to create duplicate weapons with "left hand" itemtypes, like the shield, but then to duel wield you would need a right hand sword, and a left hand sword, not just 2 swords.
|
|
|
Post by rasto61 on Oct 30, 2018 7:09:53 GMT
It's definitely working, I can pickup ammo, shoot and it reloads as far as I have ammo in the inventory. We need to figure out what you set up incorrectly. Are you sure the weapon you are using has the same ammoID on it as the ammoID on the standaloneAmmo? Also make sure you did not accidentally leave the old vAmmoManager on the player. I'm having the exact same problem he is. I can pick up Invector Pickup Ammo and it will recognize it in vAmmoManager_InventoryPro, though it's not reading Inventory Pro's ammo. I get a "can't use till <timestamp>" error whenever i try to "use" the item in the inventory.
It looks like It's using IP to equip the weapon, but everything else is using Invector's standalone components. The Ammo item in Inventory Pro does nothing, and does not effect the ammo for the gun (no way to add the bullets to the clip, or read the bullets).
Also Duel wielding does not work. It's the same as sickscores was. The EquipHandler treats every weapon as rightHanded, so the melee manager can not execute any leftHanded code. This means whenever a weapon is equiped, it sets the attackID, and when unequiped it removes the AttackID. So if you equip both weapons, and remove either weapon, the attackID gets set to 0. Going to take a look at the EquipHandler and see if i can fix it. If anyone has solved this, please let me know, would love to know the answer. The hard part is that inventory pro has no way to tell the melee manager which slot it is equiping the weapon from, since it only see's the weapon catagory. You would have to create duplicate weapons with "left hand" itemtypes, like the shield, but then to duel wield you would need a right hand sword, and a left hand sword, not just 2 swords.
Just about to continue on the project where I'm working with this, so Ill look more into the ammo. About the dual wielding Stuff that goes into the left hand needs a left hand equipment type, stuff that goes into the right hand needs a right hand equipment type and stuff that can be dual wielded just needs a hand equipment type. The Equipment handler is looking for 'left' or 'right' in the equipment type's name. With this equipment handler you can equip any [Invector] equipment type into any hand. Sickscore only allowed defense in the left hand and attack in the right. I now forgot if you could equip an attack in both left and right hand, but I think it didn't allow that? This Equipment Handler is more flexible and mostly takes into consideration how you setup what goes where with inventory pro. The Problem with dual wielding is that Invector doesn't handle that. If you equip two swords, [you would want each to have an equipment type of just 'Hand' (or whatever you want to call it)] then it equips a sword into the first empty hand. But the melee manager still only plays the right swords attack. You will need to extend Invector's components to handle that.
|
|
|
Post by shadex on Oct 30, 2018 8:25:20 GMT
I'm having the exact same problem he is. I can pick up Invector Pickup Ammo and it will recognize it in vAmmoManager_InventoryPro, though it's not reading Inventory Pro's ammo. I get a "can't use till <timestamp>" error whenever i try to "use" the item in the inventory.
It looks like It's using IP to equip the weapon, but everything else is using Invector's standalone components. The Ammo item in Inventory Pro does nothing, and does not effect the ammo for the gun (no way to add the bullets to the clip, or read the bullets).
Also Duel wielding does not work. It's the same as sickscores was. The EquipHandler treats every weapon as rightHanded, so the melee manager can not execute any leftHanded code. This means whenever a weapon is equiped, it sets the attackID, and when unequiped it removes the AttackID. So if you equip both weapons, and remove either weapon, the attackID gets set to 0. Going to take a look at the EquipHandler and see if i can fix it. If anyone has solved this, please let me know, would love to know the answer. The hard part is that inventory pro has no way to tell the melee manager which slot it is equiping the weapon from, since it only see's the weapon catagory. You would have to create duplicate weapons with "left hand" itemtypes, like the shield, but then to duel wield you would need a right hand sword, and a left hand sword, not just 2 swords.
Just about to continue on the project where I'm working with this, so Ill look more into the ammo. About the dual wielding Stuff that goes into the left hand needs a left hand equipment type, stuff that goes into the right hand needs a right hand equipment type and stuff that can be dual wielded just needs a hand equipment type. The Equipment handler is looking for 'left' or 'right' in the equipment type's name. With this equipment handler you can equip any [Invector] equipment type into any hand. Sickscore only allowed defense in the left hand and attack in the right. I now forgot if you could equip an attack in both left and right hand, but I think it didn't allow that? This Equipment Handler is more flexible and mostly takes into consideration how you setup what goes where with inventory pro. The Problem with dual wielding is that Invector doesn't handle that. If you equip two swords, [you would want each to have an equipment type of just 'Hand' (or whatever you want to call it)] then it equips a sword into the first empty hand. But the melee manager still only plays the right swords attack. You will need to extend Invector's components to handle that. Already solved Invector handling Dual Wielding back when the forum first started. It's a pretty simple edit to the melee manager.
Now as far as the equip handler, it's by itemType, so if you were to create RightHandMelee, every single weapon would be equiped in right hand slot in the melee manager. If you equip a RightHandMelee itemtype in the left hand, it will still show up in the righthand slot in the MeleeManager, and override the previous weapon. This means none of the left hand code in the melee manager ever gets executed unless it has left in the item type. It also means that it reset's the AttackID to 0 on removal (even if there is another weapon equiped).
The only solutions i can think of is to either figure out a way to make meleeWeapons equiped in the leftHand to not process the AttackID and some way of letting the melee manager know when 2 melee weapons are equiped at the same time.
Option 2 would be to remove the hardcoded string search for left and right, and have the equipHandler detect which slot it's equiped in. Though not sure if IP has code to detect items in equip slots.
The best option of course is to actually make a weapon in the right equip slot equip in the rightHandSlot in the MeleeManager, and if the weapon is equiped in the lefthand equipSlot, equip it in the lefthandslot in the melee manager.
|
|
|
Post by rasto61 on Oct 31, 2018 15:12:50 GMT
Already solved Invector handling Dual Wielding back when the forum first started. It's a pretty simple edit to the melee manager.
Now as far as the equip handler, it's by itemType, so if you were to create RightHandMelee, every single weapon would be equiped in right hand slot in the melee manager. If you equip a RightHandMelee itemtype in the left hand, it will still show up in the righthand slot in the MeleeManager, and override the previous weapon. This means none of the left hand code in the melee manager ever gets executed unless it has left in the item type. It also means that it reset's the AttackID to 0 on removal (even if there is another weapon equiped).
The only solutions i can think of is to either figure out a way to make meleeWeapons equiped in the leftHand to not process the AttackID and some way of letting the melee manager know when 2 melee weapons are equiped at the same time.
Option 2 would be to remove the hardcoded string search for left and right, and have the equipHandler detect which slot it's equiped in. Though not sure if IP has code to detect items in equip slots.
The best option of course is to actually make a weapon in the right equip slot equip in the rightHandSlot in the MeleeManager, and if the weapon is equiped in the lefthand equipSlot, equip it in the lefthandslot in the melee manager.
I just changed that so instead of looking at the equipment type it looks at the equip transform and looks either for "l" or "r" and decides based on that. (I think its a reasonable assumption to make that the holder transform will contain these letters in some form?) I have updated the package on the drive.
|
|
|
Post by darknubis365 on Nov 1, 2018 3:36:31 GMT
is this possible with the melee you think?i dropped the prefab in the demo controller scene of IP and i was able to get the items off the ground using the A button.But i couldnt move things like the UI which i'd like to try using
|
|