|
Post by Carrot on Mar 9, 2022 3:38:38 GMT
I have my own UI using Image.fillamounts and i cant see to figure out how to use it with the current health in vhealthcontroller. Also i want to add thirst and hunger. Right now i have that working but i want it to affect health as well when it is empty. And Lastly i need to attach my Stamina just like the health i have it using a fillamount
can someone start me off in the right direction i feel its right there and im missing it
Thanks in Advance
|
|
|
Post by manwitch on Mar 9, 2022 14:32:35 GMT
|
|
|
Post by Carrot on Mar 9, 2022 19:25:09 GMT
Thanks, from the quick glance it looks to be what i need. Appreciate the rapid response most helpful
|
|
|
Post by Carrot on Mar 9, 2022 20:50:21 GMT
I Have read and watched the videos and tried to figure out what went wrong but to no avail I'm getting a namespace error and what am i missing I'm not showing errors in console but i was. when i hit play it says fix errors, and when i look on the inspector where the script was added nothing is populating. Thanks Again
|
|
|
Post by manwitch on Mar 9, 2022 21:34:04 GMT
There are a few problems with using this exact script with the latest Invector version... I was pointing you towards this thinking you could use it as a helper for your own scripts, but, make sure you change the using directive to vCharacterController instead of CharacterController...
I use these scripts after fixing the errors, but it was a long time ago, and I don't remember everything I had to change to get them to work.
So, change the using directive to - using Invector.vCharacterController - and then see what you get.
Then post here again with new problems and we can go from there, I will try to help you to get it working.
|
|
|
Post by lvlegend74 on Mar 9, 2022 21:49:51 GMT
Yes I had already fixed that, the issue now is the Health is inaccessible although im looking through the health controller and cant see anything protecting it. I could just be overlooking something simple. there are a few more errors but wont know till i fix health see what clears. here is the errors in VS
|
|
|
Post by lvlegend74 on Mar 9, 2022 21:51:39 GMT
***** forgot to mention on Post above *****There were some protections but i made a few things public but missed something. cause error still there.
Is there a way to edit the post here lol again long night may have missed it
|
|
|
Post by manwitch on Mar 9, 2022 22:11:37 GMT
If I remember right, the accessor error has to do with changing a float to an int. I'm not able to look through this as Im not at the right computer, but when I can I will post where to go for that error.
|
|
|
Post by lvlegend74 on Mar 9, 2022 22:35:22 GMT
Thanks ill come through it as well see if i can find anything when i get back. Here are the Codes from VS in regards to this. if it helps to refresh what is happening.
|
|
|
Post by manwitch on Mar 9, 2022 23:45:09 GMT
The only protected I changed for the protected error was line 38 of vHealthController.cs and I just removed the protected so it's just a get set statement.
The accessor one, I think, was line 541 of InvectorAddOn.cs I changed it to this- InvectorBridge.myController.maxHealth = (int)InvectorStats.Vcurrent_health;
Which is just adding the "(int)" to the original line I don't recall some of those errors I see on your screen shots but we can go from here...
|
|
|
Post by lvlegend74 on Mar 9, 2022 23:59:00 GMT
The only protected I changed for the protected error was line 38 of vHealthController.cs and I just removed the protected so it's just a get set statement. The accessor one, I think, was line 541 of InvectorAddOn.cs I changed it to this- InvectorBridge.myController.maxHealth = (int)InvectorStats.Vcurrent_health; Which is just adding the "(int)" to the original line I don't recall some of those errors I see on your screen shots but we can go from here... The Accessor was the one i missed i changed the protection one but im still working on finding one more on this .... line 707 if (GetComponent<vThirdPersonMotor>().hud.damaged == true) line 714 GetComponentInParent<vThirdPersonMotor>().hud.damageImage ............hud is error does not contain deffinition Im guessing that is a custom variable for maybe a UI game object so i commented out for now till i know
|
|
|
Post by manwitch on Mar 10, 2022 2:47:54 GMT
LOL! I just checked and I commented that section out too. It has to do with the splash screen on damage part of the component in the inspector.
I had it working at one point but I think I started getting the error after an update or something. And then just commented it out because I was already working on other things in my project.
You could try to add damage images to the inspector component under the invector bridge section, and uncomment it to see if it works, it might be getting the error just because there's no images in there, but I'm not sure about that one. I just put a zero in the box after Damage Splash Screens and left that section commented.
So, if you don't care about the extra damage splash screens (like me lol) you can just leave it commented or even delete that section of code. It doesn't seem to have any adverse effects on the script. I have moved on to other things in my project and haven't had any bad stuff happen that I've come across related to it.
|
|
|
Post by lvlegend74 on Mar 10, 2022 7:17:53 GMT
No Its been working great Thanks for the Help. just needed pointed in the right direction, especially trying to follow someone else logic in code. We all have a unique way we like to put things that end same way. So thanks again
|
|