matt
New vMember
Posts: 4
|
Post by matt on May 29, 2017 7:06:57 GMT
Awesome work, but i have a question this is possible to add different equippoints for different weapons. like for sword defaultEquipPoint in inventory and for guns different EquipPoint.
|
|
|
Post by Legion on May 29, 2017 10:55:02 GMT
Awesome work, but i have a question this is possible to add different equippoints for different weapons. like for sword defaultEquipPoint in inventory and for guns different EquipPoint. Yeah, it's possible, it's at the ItemManager script if we remember well.
|
|
matt
New vMember
Posts: 4
|
Post by matt on May 30, 2017 3:06:04 GMT
Thank you for your time. but Problem is that after assigning different gameobjects for different equipPoint when i hit play button vItemManager script automatically change values. Take a Look at screenshots for better understanding.. settings before play the game. after hit play button.
|
|
|
Post by deirre on May 30, 2017 4:32:07 GMT
Loving the template. Just diving into it, a promotion pulled me away for a couple of months but now Im back on track.
WebGL foe this game, was going to implement a repeating crossbow but read invector may be adding a bow feature....interesting. Edit:: video is too dark, will update after work
|
|
|
Post by hamzah on May 30, 2017 8:41:46 GMT
This is amazing, now your shooter template is featured on the asset store main home page :D www.assetstore.unity3d.com/en/#!/list/first-person-shooter?utm_source=AssetStore&utm_medium=Feature&utm_campaign=2017-05-24_List_first-person-shooter Congratulations Invector!
|
|
ashyb
New vMember
Posts: 24
|
Post by ashyb on Jun 1, 2017 9:50:25 GMT
Hey guys! Remember that you need to open the script to add a new item type into the enum? Jorge has discovery a way to create enums dynamically at real time, you just type the string into the list and it will add into your enum, it's pretty amazing! Here is the new attribute window, now you can add or remove your attributes here: Just started playing with this. And I must say its pretty damn cool. I didn't realize how powerful it actually is and I'm so glad its a part of this asset Question tho, using var att = item.GetItemAttribute("QuestVariable"); Returns null, but using foreach (var a in item.attributes) { // returns this: Invector.ItemManager.vItemAttribute, False, QuestVariable, 0 Debug.Log(a.ToString() + ", " + a.isBool.ToString() + ", " + a.name.ToString() + ", " + a.value.ToString()); } Returns the correct values? Also, the itemManager OnAddItem event... I must be using it wrong. I assume I make a public method that accepts the vItem, public void OnAddItem(Invector.ItemManager.vItem item){} But then I get an error about unable to convert object. But if I just add getcomponent<mystuff>().OnAddItem(_item); To the itemManager code after the line where it invokes the event. It works fine.
|
|
|
Post by tharindu on Jun 1, 2017 11:24:48 GMT
Use item.attributes.GetItemAttributeByType( pass item enum ) I hope I typed that in right I don't have the code in front of me right now xD haha
|
|
|
Post by tharindu on Jun 1, 2017 11:50:15 GMT
By the way I don't know what you're trying to do but I would clearly advise not to tamper around if you're not very good at scripting. Try to understand how the events work. If I remember right there is a script file named ItemManagerEvents with the event list and the event parameters. Also if I am right, these events aren't directly invoked, they're called via vInventory class. If you want to invoke something when an item is added to the inventory, go to your third person controller object, open the item manager, and at the bottom you should have the item manager events. You can add whatever you want there. Again sorry for not posting any screenshots or something. I'm on the mobile and travelling right now
|
|
ashyb
New vMember
Posts: 24
|
Post by ashyb on Jun 1, 2017 23:10:31 GMT
By the way I don't know what you're trying to do but I would clearly advise not to tamper around if you're not very good at scripting. Try to understand how the events work. If I remember right there is a script file named ItemManagerEvents with the event list and the event parameters. Also if I am right, these events aren't directly invoked, they're called via vInventory class. If you want to invoke something when an item is added to the inventory, go to your third person controller object, open the item manager, and at the bottom you should have the item manager events. You can add whatever you want there. Again sorry for not posting any screenshots or something. I'm on the mobile and travelling right now Lol exactly what i was doing
|
|
|
Post by Invector on Jun 1, 2017 23:16:37 GMT
New update available on the vStore, and soon in the AssetStore
|
|
ashyb
New vMember
Posts: 24
|
Post by ashyb on Jun 2, 2017 2:38:41 GMT
By the way I don't know what you're trying to do but I would clearly advise not to tamper around if you're not very good at scripting. Try to understand how the events work. If I remember right there is a script file named ItemManagerEvents with the event list and the event parameters. Also if I am right, these events aren't directly invoked, they're called via vInventory class. If you want to invoke something when an item is added to the inventory, go to your third person controller object, open the item manager, and at the bottom you should have the item manager events. You can add whatever you want there. Again sorry for not posting any screenshots or something. I'm on the mobile and travelling right now Lol exactly what i was doing All good. I was using the normal method instead of the dynamic one when you select it in the inspector. Great work invector. Whatcha working on next?
|
|
ashyb
New vMember
Posts: 24
|
Post by ashyb on Jun 2, 2017 4:15:34 GMT
Hey invector, in the vInventory.cs at line 78. Can you remove the hard coded vGameController.instance.OnReloadGame.AddListener(OnReloadGame); And instead just link it from the inspector for future versions? If it's not too much trouble And the hardcoded in vThirdPersonInput.cs at line 291 protected virtual void ExitGameInput() { // just a example to quit the application if (Input.GetKeyDown(KeyCode.Escape)) { if (!Cursor.visible) Cursor.visible = true; else Application.Quit(); } }
Just use an inspector event, call it "OnEscape" or something and have the method above just call that. Then link it to another component that handles the exiting. I want to remove it and handle the exiting via my UI but the above code keeps messing it up. I can comment it out but then it shows up as "changed" next time I update the asset.
|
|
|
Post by malbers on Jun 2, 2017 16:44:16 GMT
Hi Teles I'm trying the new AutoEquip mode from the Item Manager This happen: the weapon is instantiated on both hands I also tried in an empty project and had the same result.
|
|
|
Post by Invector on Jun 2, 2017 21:37:17 GMT
Hey invector, in the vInventory.cs at line 78. Can you remove the hard coded vGameController.instance.OnReloadGame.AddListener(OnReloadGame); And instead just link it from the inspector for future versions? If it's not too much trouble And the hardcoded in vThirdPersonInput.cs at line 291 protected virtual void ExitGameInput() { // just a example to quit the application if (Input.GetKeyDown(KeyCode.Escape)) { if (!Cursor.visible) Cursor.visible = true; else Application.Quit(); } }
Just use an inspector event, call it "OnEscape" or something and have the method above just call that. Then link it to another component that handles the exiting. I want to remove it and handle the exiting via my UI but the above code keeps messing it up. I can comment it out but then it shows up as "changed" next time I update the asset. Are you having any issues with the Inventory and that line? I'm not sure why you would request that, and because the Inventory is instantiated in the scene, it's easier if we call like this. Hi Teles I'm trying the new AutoEquip mode from the Item Manager This happen: the weapon is instantiated on both hands I also tried in an empty project and had the same result. Hey malbers , indeed we didn't check very well for the Melee, initially we did this feature to work for the Shooter. We already did a great fix for the melee and now you can choose the EquipArea that this item will go, but it's a little complicated to explain here so a quick solution for right now is to open the vItemManager script, method AutoEquipItem and add a break; after the line 655.
|
|
ashyb
New vMember
Posts: 24
|
Post by ashyb on Jun 3, 2017 13:51:25 GMT
Are you having any issues with the Inventory and that line? I'm not sure why you would request that, and because the Inventory is instantiated in the scene, it's easier if we call like this. No problems, it works fine. Just testing the asset out with photon. I had to make my own game controller to handle the network players respawning and that inventory line gets in the way. Testing the AI in the latest version. The enemy AI calls the OnChase event when you (the player) attacks it. But the companion AI does not (even though the state changes). Not sure if the companion AI just doesn't call it because you are the player so that event never fires. I know your not supposed to attack your companions, but I'm thinking of using it as a npc quest giver and if any "enemy" AI's come close, it can attack them. But if you friendly fire at your companion it will attack you too. Also, the vItemManager.cs at line 486 has Destroy(equipPoint.equipmentReference.equipedObject); equipPoint.equipmentReference.item = null; Can you add a null reference check if (equipPoint != null) { if(equipPoint.equipmentReference != null) { if (equipPoint.equipmentReference.equipedObject) { Destroy(equipPoint.equipmentReference.equipedObject); equipPoint.equipmentReference.item = null; } } } Seem to get a null reference error when "Drop all items" on dead is used otherwise?
|
|