|
Post by Chronicman on Mar 27, 2020 14:35:27 GMT
Thx again Munk re-apply the hotfix. It should break out once you apply the update, also you don't need to do the health pot check any longer.
|
|
|
Post by xenoblackinc on May 4, 2020 0:46:29 GMT
Love this I used to have a script that would change like this but I never got it perfected. Can this work with the stamina system as well as health?
|
|
|
Post by gubwe on May 11, 2020 1:46:00 GMT
hie
really cool addon but i have one problem. i added driving to my character, pretty simple system with nt enter animations coz i dont have the cars with real doors. and i noticed that when i enter my car in hurt state i can still drive and all that but the problem comes when i exit the car. the heart beat audio stops and the character walks(normal walk) but cant sprint, crouch etc but is no longer using the hurt animations and when i aquire health nothing changes, it just fills up but dosent go back to normal anims. here's my script for driving:
using UnityEngine; using System.Collections; using UnityStandardAssets.Vehicles.Car;
public class EnterVehicle : MonoBehaviour { private bool inVehicle = false; CarUserControl vehicleScript; CarAudio vehicleAudioScript; CarController vehicleDriveScript; public GameObject guiObj; public GameObject carCam; GameObject player; public GameObject playerCam;
void Start() { vehicleScript = GetComponent<CarUserControl>(); vehicleAudioScript = GetComponent<CarAudio>(); vehicleDriveScript = GetComponent<CarController>(); player = GameObject.FindWithTag("Player"); guiObj.SetActive(false); }
// Update is called once per frame void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Player" && inVehicle == false) { guiObj.SetActive(true); if (Input.GetKey(KeyCode.E)) { guiObj.SetActive(false); player.transform.parent = gameObject.transform; vehicleScript.enabled = true; vehicleAudioScript.enabled = true; vehicleDriveScript.enabled = true; player.SetActive(false); inVehicle = true; carCam.SetActive(true); playerCam.SetActive(false); } } } void OnTriggerExit(Collider other) { if (other.gameObject.tag == "Player") { guiObj.SetActive(false); } } void Update() { if (inVehicle == true && Input.GetKey(KeyCode.F)) { vehicleScript.enabled = false; vehicleAudioScript.enabled = false; vehicleDriveScript.enabled = false; player.SetActive(true); player.transform.parent = null; inVehicle = false; carCam.SetActive(false); playerCam.SetActive(true); } } }
|
|
|
Post by Chronicman on May 13, 2020 4:19:33 GMT
So what I think is happening is you are turning on/off the player. The Start methods are getting called again and probably resetting the hp. Since the player was hurt when entering and that disabled inputs. One the reset happened those inputs are still disabled.
A few fixes off off the top of my head that may work.
Disable the fill health on start on invectors controller.
Store health variable and set it back when exiting vehicle.
Enableing the controls again is easily done by setting the vInput script use bools to true when exiting.
|
|
|
Post by MunK on May 23, 2020 22:25:55 GMT
So what I think is happening is you are turning on/off the player. The Start methods are getting called again and probably resetting the hp. Since the player was hurt when entering and that disabled inputs. One the reset happened those inputs are still disabled. A few fixes off off the top of my head that may work. Disable the fill health on start on invectors controller. Store health variable and set it back when exiting vehicle. Enableing the controls again is easily done by setting the vInput script use bools to true when exiting. Hey Dude, Is the Health monitor still working after the 2.5.2 update?
|
|
|
Post by xenoblackinc on Jul 16, 2020 12:44:04 GMT
nice state would be nice to have some camera effects and some audio effects added on here.
|
|
|
Post by MunK on Sept 17, 2020 10:59:36 GMT
Hi Has anybody got this working with the newest invector 2.5.3 update? I have most of it up and running but for some reason the inputs do not reset after i leave the hurt state, the animations revert to normal but i can't jump, roll or sprint?? any help would be much appreciated.
|
|