|
Post by Legion on Oct 8, 2016 0:16:54 GMT
I'm afraid that doesn't work either, it's only working when I check Startfrosting in Start Frost script (this has always worked). I'm using Unity 5.4.1f1 and Invector TPS - Melee Combat Template 1.3e. Thanks for your efforts.
Edit: For more information, I tried changing the layers and tags of the "Cold Zone", but nothing.
Edit2: I just noticing that when body temperature rises or falls to critical levels, the character takes no damage. I'm jinxed.
|
|
|
Post by jgiroux on Oct 8, 2016 1:35:32 GMT
I think I need more information, as I just imported a fresh version (with and without the frost effect - without frost effect I had to comment out the If statements for all the frost effects in InvectorAddOn.cs // if (Camera.main.GetComponent<StartFrost>() != null) //custom frosting screen unavailable to public // { // Camera.main.GetComponent<StartFrost>().MaxFrostAllowed = 0.33f;//custom frosting screen unavailable to public // }
etc, but both of them worked without any issue.
things Id like to ask if I might 1st) your alpha for the GUI image you are using for your mask is not set to zero right? it should be opaque or near to. 2nd) Your body temp modifier isn't set to 0.0 is it? 3rd) are the other overlays like hunger and such working? or are you not using anything but the heat and cold aspect? I ask because they all use the same code, so if the others work, the code for that should work as well.
so Im a little stumped.
|
|
|
Post by Legion on Oct 8, 2016 1:57:06 GMT
I'm testing with the GUI Image from Invector damage overlay, hungers works great, when reaches max values, stamina begins to decrease, also thirst works fine decreasing character's health, but any body temperature decrease character's stats. I tested with different values for Body Temp Modifier, 0'005, 0'1, 0'5, 1, 5... I see the temperature going up or down in Inspector as well as in the UI, but nothing happens.
Edit: UI Overlays are working in all elements, btw.
|
|
|
Post by jgiroux on Oct 8, 2016 13:47:19 GMT
another question for you SVRGN, just so I know we are both on the same page. are you talking about the *invectorAddON* not working if you manually *check* getting cold, getting hot? it seems to me, that its not the AddOn that is causing you issues but in using the *Trigger Add-On" that is causing issue? is this correct? because if so, I've been looking at the wrong script to fix all this time
|
|
|
Post by Legion on Oct 8, 2016 16:19:11 GMT
Uumm, not quite, everything works, fifty-fifty, I can manually check getting cold/hot and body temp decreases/increases fine, but the character never takes damage, as well as trigger effect, when character enter in a "temp zone", its body temp changes, but never takes damage (or decreased stamina, I don't know what it does because it's not working for me >.<).
In short, I think it's InvectorAddon who causes me problems, by not allowing the character takes damage when temp. levels are extreme.
|
|
|
Post by wieljer on Feb 11, 2017 4:01:55 GMT
Hello, cool system tried it out in 2.0c and just for awareness the 'hud' is no longer in the vThirdPersonMotor script so got errors in 2.0c since being switched to vHUDController.
So just made the changes to get it working:
GetComponent<vThirdPersonMotor>().hud.damaged TO -> GetComponent<vHUDController>().damaged
and
vThirdPersonMotor>().hud.damageImage TO -> GetComponentInParent<vHUDController>().damageImage
|
|
|
Post by wieljer on Feb 11, 2017 16:31:35 GMT
Found this bug -> StaminaFillImage.fillAmount = HealthPercent;
float HealthPercent = InvectorBridge.myController.currentHealth / InvectorBridge.myController.maxHealth; if (InvectorBridge.UI_HealthFillImage != null) { InvectorBridge.UI_HealthFillImage.fillAmount = HealthPercent; } float StaminaPercent = InvectorBridge.myController.currentStamina / InvectorBridge.myController.maxStamina; if (InvectorBridge.UI_StaminaFillImage != null) { InvectorBridge.UI_StaminaFillImage.fillAmount = HealthPercent; }
|
|
|
Post by xlushix on Apr 29, 2017 12:24:48 GMT
I have also got an error,
NullReferenceException: Object reference not set to an instance of an object InvectorAddOn.Update () (at Assets/__Game/Scripts/Survival/InvectorAddOn.cs:705) which is,
if (GetComponent<vHUDController>().damaged == true) I have tried to fix it but no good. I imported latest version of invector shooter in a fresh project, added theses scripts, made the vHUDController edit because otherwise it don't work. I get that error and nothing works. Now if I remove that little section the hunger cold and stuff works but without that section once the hunger and stuff hit max, I don't lose health or stamina? Anyone have any ideas, or hit this problem?
Also new to the forum and invector.
|
|
|
Post by pauloxande26 on Apr 30, 2017 5:19:59 GMT
Can you help me with this
|
|
|
Post by xlushix on Apr 30, 2017 17:02:08 GMT
pauloxande26As it says 3 posts above yours by wieljerchange line 705 to, GetComponent<vHUDController>().damaged and change line 712 to, GetComponentInParent<vHUDController>().damageImage which is the closest to right i have found but my post right above yours, if your on the new version of Invector shooter/melee will you will get that error and that one i cant figure out.
|
|
|
Post by shadex on May 6, 2017 0:25:54 GMT
pauloxande26 As it says 3 posts above yours by wieljer change line 705 to, GetComponent<vHUDController>().damaged and change line 712 to, GetComponentInParent<vHUDController>().damageImage which is the closest to right i have found but my post right above yours, if your on the new version of Invector shooter/melee will you will get that error and that one i cant figure out. This code: GetComponent<vThirdPersonMotor>().hud.damaged TO -> GetComponent<vHUDController>().damaged The problem with it is that vThirdPersonMotor is part of the player object (to which the script is attached). vHUDController is part of the UI which is a seperate game object. So i think the new code is trying to access vHUDController through the player object, instead of accessing the UI object to get the vHUDController component. So you have to change the code to refrence the hud component from the UI game object instead of accessing a non existant hud component on the player. The problem is my brain is fried at the moment, and i can't figure out how to access another game object from the script to fix it (I forgot the syntex and suck at coding).
|
|
|
Post by xlushix on May 6, 2017 3:43:32 GMT
I can access any script with the
public scriptname script
And then go with
Script.damage or whatever
The thing is I can't figure out what I need to access in what script. In one script I can access the damage from the motor just fine but in this one I cant o.O lol. So dead end for me....
|
|
samet
New vMember
Posts: 7
|
Post by samet on Sept 6, 2017 11:32:55 GMT
Thank you
|
|
|
Post by pauloxande26 on Sept 6, 2017 18:08:47 GMT
|
|
|
Post by jrackley on Sept 6, 2017 18:14:27 GMT
Make sure that at the top of the script there is... Using Invector.CharacterController; Not just Using Invector; and you probably need Player.GetComponent<vCharacter>() != null;
|
|