|
Post by Strider on Nov 26, 2017 3:41:18 GMT
The enemy health delay prefab is really cool looking, it also has a SUBHEALTH delay option that let's you know exactly how much life was lost... i want to implement that into the player, because the already existing HUD doesn't have the subhealth slider and also, it refreshes the change in health quite slow, so it's not as precise as the prefab. I added the prefab to my player, but the subslider doesn´t move. Any help on implementing this? Thanks!
|
|
|
Post by resdin on Nov 26, 2017 18:39:48 GMT
From taking a quick look I'd start with:
I'd assume you're referring to v_Spritehealth.cs -- you could likely integrate it with vCharacter.cs pretty easily. Maybe adapt vCharacter to use the health delay or other features you want. If you look at the vHealthItem they are using vThirdPersonController to apply health increase but vCharacter seems like the best place to start for this integration. Just look for damage being applied and UI being updated and hook into that.
I'd have to start working with it to help you any further than that and figure out which is most appropriate / viable solution.
|
|
|
Post by Strider on Nov 26, 2017 20:35:31 GMT
Yes, i was checking v_Spritehealth.cs ... as i looked, the subdelay slider gets the maximum health from the character, but doesn't lower it when taking damage like an enemy AI, the valus gets stock at the maximum all the time.
Thanks!
|
|
|
Post by resdin on Nov 27, 2017 21:38:47 GMT
So when you put the v_Spritehealth.cs on your player and fill the public variables in the inspector everything works but damage slider does not? Is it just the slider or is the script applying damage and the UI slider not updating?
In the start function you should change the way GetCompenent is working to get vCharacter unless your controller is indeed in a parent object. You could also try changing vCharacter to vCharacterThirdPerson which seems to work similar.
Otherwise it looks as if you could just plop that script on the player and have it work.
In time I will be working with AI and damage handling and I'll be able to give this more time.
|
|
|
Post by Strider on Nov 28, 2017 0:58:40 GMT
So when you put the v_Spritehealth.cs on your player and fill the public variables in the inspector everything works but damage slider does not? Is it just the slider or is the script applying damage and the UI slider not updating? In the start function you should change the way GetCompenent is working to get vCharacter unless your controller is indeed in a parent object. You could also try changing vCharacter to vCharacterThirdPerson which seems to work similar. Otherwise it looks as if you could just plop that script on the player and have it work. In time I will be working with AI and damage handling and I'll be able to give this more time. The subslider gets the maximum health and stays that way, it won't come down even if energy is lost.
|
|
|
Post by resdin on Nov 29, 2017 13:43:17 GMT
Hey Strider,
If this is still not solved I'd shoot them an email at support; they'll get you on the right track if you haven't already.
|
|
|
Post by Strider on Dec 2, 2017 6:01:16 GMT
Hey Strider, If this is still not solved I'd shoot them an email at support; they'll get you on the right track if you haven't already. That would be nice, i haven't found how to solve this. Thanks!
|
|