|
Post by coolguyplatinum on Mar 16, 2020 15:52:25 GMT
I followed the docs and tutorials and followed this thread. My character's health still doesnt go up when collecting potion.
|
|
|
Post by Chronicman on Mar 16, 2020 16:34:07 GMT
Hp does not go up by collecting, you must equip the potion in the consumable slot then you can use it by the “u” key.
|
|
|
Post by coolguyplatinum on Mar 17, 2020 16:31:13 GMT
I'll give that a shot Chronicman. But what if I just wanted to use it just from picking it up?
|
|
|
Post by Chronicman on Mar 17, 2020 16:54:16 GMT
That would require code modification. You could use the old health item and just change the appearance and update the database. That is just a theory tho.
|
|
|
Post by coolguyplatinum on Mar 17, 2020 18:43:10 GMT
So its working now but it seemed to make my character collision capsule act weird. The capsule collider stopped working. Character sinks through ground when I add the item collection script.
|
|
|
Post by Chronicman on Mar 17, 2020 19:09:19 GMT
That’s weird should not effect that at all. Check your item manager events again make sure something wasn’t miss clicked. Are you using the new potion or old health item thing ?
|
|
|
Post by coolguyplatinum on Mar 17, 2020 20:04:03 GMT
Yeah I think I did somethin wrong with the events. Using both item methods.
NullReferenceException: Object reference not set to an instance of an object Invector.vItemManager.vCheckCanAddHealth.CanUseItem (Invector.vItemManager.vItem item, System.Collections.Generic.List`1[System.Boolean]& validateResult) (at Assets/Invector-3rdPersonController/ItemManager/Scripts/Examples/vCheckCanAddHealth.cs:58)
|
|
|
Post by Chronicman on Mar 17, 2020 20:16:08 GMT
are you getting that error only on the old item method, if so try removing the events and try it again. You may only be able to use one method I’m not sure this is unexplored for me.
|
|
|
Post by coolguyplatinum on Mar 17, 2020 22:13:45 GMT
I got everything all up and running. It takes a whole lot of trial and error in the end. I'm glad you guys are here to help, but docs and tutorial vids get outdated so fast that you really have to test out new methods yourself.
|
|
|
Post by Chronicman on Mar 17, 2020 22:30:48 GMT
Well I’m not part of the Invector team and yes the docs need to be updated a bit but that’s a good thing. For one you know the dev keep updating the project and two you learn a lot more when you fumble. May I ask how you solved it ? Just in case this comes up again ?
|
|
|
Post by Invector on Mar 17, 2020 23:57:43 GMT
There is an example in the Basic Demo scene of an item (not from the ItemManager, just a simple collectible) that recovers health via OnTriggerEnter
|
|
|
Post by coolguyplatinum on Mar 17, 2020 23:58:58 GMT
Besides having the item manager script on the character, make sure to also have the following:
inventory check item prefab
vcheck item is equipped script
vcheck can add health script
other stuff in the hierarchy should be:
item collection display prefab
any health and weapon prefabs to test with.
|
|
|
Post by coolguyplatinum on Mar 18, 2020 0:04:56 GMT
Thanks for the information Invector.
|
|