|
Post by nerdares on Nov 2, 2016 3:34:58 GMT
Instructions: 1) Download package 2) Open your Unity Project 3) Import Invector 3rd person controller 4) Import the package 5) Read the README in the package and follow the steps 6) Read the INFORMATION in the package to understand more about the Survival System Link to package: www.dropbox.com/s/ts5d4k6aa90r0jh/Invector%20Survival%20System%20Addon.unitypackage?dl=0Updates news: AS OF 3/4/16, this update has greatly increased flexibility - Changed core of the system. For more information look at the INFORMATION file inside the package - NEW: Template-like system for the Survival System - Remove the Circular GUI around the minimap and made a "template-like" method for GUI's to make custom GUI'd more flexible.
Features:
- Dynamic Survival System Inspector where you can change your subsystems on the spot.
- Ability to create new templates and subsystems very quickly.
- Circular MiniMap included. Supports zooming in and out (parameters for those are accessible in MiniMapController script inspector). "NumberPad+" for zoom in. "NumberPad-" for zoom out
- Provides different health and stamina bars, plus hunger and thirst bars with the package
- Support for vCharacterStandalone's and AI
Limitations:
- Minimap camera performance may drag you down a bit
- FadeText doesn't display when the controller input has changed, and it doesn't display whether you're in keyboard or joystick yet
If you want to help, feel free! I could really use it haha.
|
|
|
Post by Chronicman on Nov 2, 2016 5:11:08 GMT
Nice work man, you picked up inheriting and overriding fast! Is this for 2.0 or 1.4 ?
|
|
|
Post by nerdares on Nov 2, 2016 13:12:23 GMT
Nice work man, you picked up inheriting and overriding fast! Is this for 2.0 or 1.4 ? Haha thanks man! I've already had past experience on that stuff a loooong time ago I just had that moment where I forgot I could use overriding methods. I'm just in a roadblock right now after I figured out that the AI also use vCharacter. This is for 2.0 yes I have also committed to making a custom hud controller for this package. I'll upload the code later, but it's very simple. It just looks for the third person controller that has a vCharacter component. The GUI gamepbject has health bars and stamina bars already. There are already methods there that will sync with the vCharacter instance's CurrentHealth and CurrentStamina
|
|
|
Post by Invector on Nov 2, 2016 13:21:39 GMT
Very nice nerdares ! * thread moved to the addon section
|
|
|
Post by nerdares on Nov 4, 2016 1:04:53 GMT
Very nice nerdares ! * thread moved to the addon section Hey so my vCustomGUI isn't able to find the player on this line of code: player = GameObject.FindGameObjectWithTag("Player").GetComponent<vSurvivalPlayer>();
I think it's because the player doesn't exist inside the default scene, it exists in the DontDestroyOnLoad level instance. I'm using the BasicLocomotion scene right now. How would I go about finding objects in that scene?
|
|
|
Post by Chronicman on Nov 4, 2016 1:38:21 GMT
you could try adding this to vCharacter: public static vCharacter instance; public static vCharacter Instance { get {if (instance == null) {instance = GameObject.FindObjectOfType<vCharacter >();} return vCharacter .instance;} } Then just call vCharacter.instance.gameObject or whatever you need.
|
|
|
Post by nerdares on Nov 4, 2016 1:41:15 GMT
you could try adding this to vCharacter: public static vCharacter instance; public static vCharacter Instance { get {if (instance == null) {instance = GameObject.FindObjectOfType<vCharacter >();} return vCharacter .instance;} } Then just call vCharacter.instance.gameObject or whatever you need. As a matter of fact, since I've been looking through all the code, I've noticed similar lines of code where there is an instance variable like that. What's the purpose of making a vCharacter instance and how does it work?
|
|
|
Post by Chronicman on Nov 4, 2016 2:03:37 GMT
well to be honest I couldn't tell yah lol. I just found it in some code and thought it might work for you. I don't really know why you are having trouble finding the player with the previous code either.
I know that its a property and when you use the get function it well check if instance is null if so it will find its self and return vCharacter. Why vCharacter probably because its the last inheritance for the vThirdPersonController.... I think and that it linked to the game object player.
|
|
|
Post by nerdares on Nov 4, 2016 3:27:36 GMT
@invector Any ideas?
|
|
|
Post by Chronicman on Nov 4, 2016 21:56:12 GMT
Are you sure its not a timing issue ? It just dose not make any scene. Your trying to find the player at start right ? so maybe its being called before player is found.
|
|
|
Post by Chronicman on Nov 4, 2016 22:06:35 GMT
If you go into edit/project settings/script exaction order you can set what scripts start when. So you will be able to fix any timing issues there. Normally you could do this by code but unity has this built in little system that's really handy.
|
|
|
Post by Chronicman on Nov 4, 2016 23:35:37 GMT
Okay try more time between them maybe... If that does not work why not try reversing the instance. Add instance to GUI and on players start add its self into the GUI. You could also make a static script and add player into the static script at start then call your static script .player that may work as well.
|
|
|
Post by Chronicman on Nov 5, 2016 5:21:38 GMT
So I was dealing with the same situation just a minute ago and this was my solution. public static myScript instance; void Start() { instance = GetComponent<myScript >(); }
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 4, 2016 3:33:30 GMT
Looks amazing for a survival template for Invector!!!
|
|
|
Post by nerdares on Dec 9, 2016 5:56:16 GMT
Hey guys! So I have cleaned up this thread because it got messy but as of today there is an update! Go to the first post with the link. From now on I will just update the file, so the link will stay the same. Stay tuned for more!
|
|