|
Post by hobbycoder on Feb 21, 2020 15:04:10 GMT
Hi! I made a very simple video on how you can equip a wearable item in your character.. I just used head wearable as example, but you can add more..Set-up the right equip points, enum, and handler and your good to go..
In the video, the fiery hair is made up of an empty object and added a fire particle...Just an example..
|
|
|
Post by hobbycoder on Feb 21, 2020 16:11:40 GMT
Example on how you can apply the attributes from wearable item to the player stats..
|
|
|
Post by manwitch on Feb 22, 2020 4:53:47 GMT
Thanks for this, Very helpful.
|
|
|
Post by hobbycoder on Feb 22, 2020 6:47:08 GMT
Welcome..Hope the steps in the video can be easily followed
|
|
|
Post by nopebutwhy on Feb 29, 2020 2:16:27 GMT
Great Tutorial's and very easy to follow
|
|
|
Post by beinomat on Apr 6, 2020 18:34:21 GMT
Example on how you can apply the attributes from wearable item to the player stats.. Great tutorial, very helpful! I noticed that the "TestWearables"-Script is adding all the attribute values on the Item, f.e. if there's the attribute healthIncrease = 50 and another attribute like itemValue = 50 it will always add 100 health on item equip instead of just 50.
I'm not good at coding but I guess it has to do with this line: "foreach (vItemAttribute attribute in it.attributes)"
I tried modifying it so it will only add the value of one specific attribute, but without success. How could one achieve this?
|
|
|
Post by hobbycoder on Apr 6, 2020 21:41:28 GMT
You can try this sample code for specific attribute..,
foreach (vItemAttribute at in item.attributes) { if(at.name == Invector.vItemManager.vItemAttributes.Health) { controller.AddHealth(at.value); }
if (at.name == Invector.vItemManager.vItemAttributes.Damage) { //Increase damage } }
|
|
|
Post by beinomat on Apr 7, 2020 16:20:00 GMT
You can try this sample code for specific attribute.., //code Awesome, works perfect! Thank you very much It's probably a completely other thing, but any ideas on how to trigger an event on equipping an item? (Simple idea for a workaround would be enough)
|
|
|
Post by beinomat on Apr 8, 2020 19:18:00 GMT
I figured out how to trigger the event, but I encountered a problem with your system. I created 2 wearables like in your video (wearable_head and wearable_body) and did everything exactely the same for wearable_body, but it will always instantiate the item on the "Head"-handler. Of course I created another handler for the body, but it doesn't work. I also tried creating it's own ItemEnumsList, own equip area in the UI, own custom and default handlers and some other stuff. Does it work with 2 items for you? Why is the handler not working as intended? Would appreciate any help
Edit: Never mind, I forgot to change the Equip Point Name on the Equip Slot in the UI... Thank's anyway for your addon :P
|
|
|
Post by Invector on Apr 18, 2020 13:47:51 GMT
|
|
|
Post by kingceryn on Jul 16, 2020 3:30:11 GMT
This still working? Can't quite get it to work with skinned mesh renderers. Prefab always removes root bone
|
|
|
Post by hobbycoder on Jul 16, 2020 8:11:15 GMT
This still working? Can't quite get it to work with skinned mesh renderers. Prefab always removes root bone kingceryn , please email at myhobbycoding@gmail.com ..so i can help u set up the clothing system..
|
|