|
Post by nerdares on Oct 11, 2016 5:16:44 GMT
I'm currently creating my own survival system that is unique and flexible to any game you want that will require this. Now, I'm working on a template script for the third person controller player, and I was wondering, where specifically is the code located, in which the character will be identified as "moving".
Basically what I want to do is check if the character is not sprinting or jumping or etc. then activate my regenStamina method.
Also I need to know how it is identified as moving. Is it based off speed or input?
|
|
|
Post by Invector on Oct 11, 2016 11:25:44 GMT
There is several bools created in the ThirdPersonMotor that we use to check some actions, like isJumping, isSprinting, isCrouched, etc... and you can check if he is moving with the speed value, 0.5f is walking, 1 is running and 1.5 is sprinting.
|
|
|
Post by nerdares on Oct 16, 2016 21:41:28 GMT
Ok, since the jump variables and sprinting variables and other are protected, should I change them to public? I cannot access them in one of my scripts when I make an instance of vThirdPersonController
|
|
|
Post by nerdares on Oct 16, 2016 22:09:21 GMT
Also another thing, since death and stopping the character from sprinting are controlled by the Health and Stamina methods in your vThirdPersonController scripts, should I comment those methods out or something? I want the user to be able to use my SurvivalSystem scripts and use the InvectorTemplate I made for it.
Then again, that would be something inefficient. The user would have to comment out those methods anyway so if there's a better approach, list them below.
Basically in MY SurvivalSystem Script, I have health methods and stamina methods that should kill the character and also make the character stop moving if stamina is 0. But this interferes with the stamina and health values and methods in the vThirdPersonController script
|
|
|
Post by Invector on Oct 17, 2016 2:34:09 GMT
In this case just replace our health & stamina variables to yours, or replace your variables to the vCharacter health/stamina. Feel free to customize the template to your needs, that's the hole idea of our asset
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 4, 2016 17:56:39 GMT
Will it be a addon?
|
|