|
Post by Invector on Dec 11, 2016 18:26:09 GMT
wow sorry about the late response, I didn't get the alert for some reason... anyways, you could try to find the gamecontroller instead, like this: private vGameController gm;
void Start() { gm = FindObjectsOfType<vGameController>();
if(gm != null) { var myAddon = gm.currentPlayer.GetComponent<MyAddon>(); } }
|
|
|
Post by nerdares on Dec 28, 2016 12:40:21 GMT
I will be releasing an update soon when I'm available (sorry winter break has kept me super busy!). This package will have full compatibility with AI and vCharacterStandalone's (like the punching bags for example)
I also made some improvements on the mini map as well.
I have a quick question for anyone to answer btw: So far, if you've used this package, you'll notice in the readme that you'll have to copy paste code that I put on the readme. Then you'd have to go to each script and paste those. It's hard coding basically. I wanted to provide ease to the user without replacing much code. Some of the stuff I just wanted to do was to kind of "override" methods. -I put quotes around override because overriding wouldn't be the correct approach. This has really stumped me
One of the solutions I may have figured out was the use of delegates if that's the correct path. Is it possible? Let me know if there is any other way I can do it, I could really use the help
|
|
|
Post by nerdares on Dec 31, 2016 7:16:53 GMT
Update released! Go check it out
|
|
|
Post by uberwiggett on Jan 14, 2017 4:32:03 GMT
Yeah I'm thinking his posts are just trolling to cause trouble.
|
|
|
Post by nerdares on Feb 27, 2017 6:26:30 GMT
Currently working on a big change to the system, just in case anyone had been curious. School has been keeping me really busy so I haven't had any time to work on this. Stay tuned guys!
|
|
|
Post by nerdares on Mar 1, 2017 21:04:48 GMT
Almost done with the survival system but here's what's up:
The survival system is now going to be done differently. Instead this is how it will be:
Think of every survival aspect (like health, hunger, stamina, thirst etc.) Each one can be thought of as a derivative of a basic common survival system. My attempt was to make interfaces represented each system, but that's inefficient.
So here's how it works:
There is one abstract class called BasicSystem. This contains variables like "current value" or "max value" etc. Every thing, like health and stamina, will be called subsystems. They will inherit from BasicSystem, and any additional methods and variables unique to the subsystem can go to its subsystem class.
Additionally, each character in your game can come from a vSurvivalPlayer template. Basically there is a script called vSurvivalPlayer, which stores subsystems that will be used. I think every vCharacter uses health and stamina, so the health and stamina subsystems are declared and initialized in vSurvivalPlayer. This is an abstract class though. The main, third person controller will have a class called MainPlayer. This will inherit vSurvivalPlayer and additional subsystems you want the character to have should be declared and initialized there.
This same process will go for AI and punching bags, but with different sets of subsystems.
With this idea, you can create many other game characters with different systems if they should have any.
Overall this approach is working really well and I can't wait to share it. Right now my only issue is, it will be difficult to make an editor script for all the subsystem's properties of each template. Any help on how I can do that? Basically take the MainPlayer. He may have health, stamina, hunger and thirst. Their properties should be exposed and editable via inspector. Does the user have to manually create the editor script for this or can I make some editor buttons to automate this?
|
|
|
Post by sickscore on Mar 1, 2017 23:30:14 GMT
... Overall this approach is working really well and I can't wait to share it. Right now my only issue is, it will be difficult to make an editor script for all the subsystem's properties of each template. Any help on how I can do that? Basically take the MainPlayer. He may have health, stamina, hunger and thirst. Their properties should be exposed and editable via inspector. Does the user have to manually create the editor script for this or can I make some editor buttons to automate this? Sorry, but I don't get it. What do you mean with "Creating editor scripts with buttons"?
|
|
|
Post by nerdares on Mar 2, 2017 0:28:09 GMT
... Overall this approach is working really well and I can't wait to share it. Right now my only issue is, it will be difficult to make an editor script for all the subsystem's properties of each template. Any help on how I can do that? Basically take the MainPlayer. He may have health, stamina, hunger and thirst. Their properties should be exposed and editable via inspector. Does the user have to manually create the editor script for this or can I make some editor buttons to automate this? Sorry, but I don't get it. What do you mean with "Creating editor scripts with buttons"? Don't worry about it too much. I figured out how I can expose the fields of different subsystems to the inspector in an organized fashion. My next plan is to make a menu item and in the menu, there will be a menu item called SurvivalSystem. It will bring a drop down menu with two things you can click: Create subsystem Create template. From there, it should generate a c# script with preloaded code inside for you. But first things first, is this a good idea at all? I want the user to be able to make templates and subsystems VERY easily with as little code for them as possible
|
|
|
Post by uberwiggett on Mar 2, 2017 7:05:32 GMT
that last part of the last sentence answers the first part of the last sentence, YES! the less I have to code, the better!
|
|
|
Post by nerdares on Mar 5, 2017 2:25:38 GMT
Update is now up! Please contact me if you have any issues.
|
|
|
Post by nerdares on Mar 5, 2017 22:09:05 GMT
Invector I looked at the shooter template thread and it looks like you did something with enums to add items and such. Do you think it's possible for me to use that method for the survival system? I would see it as great use if you wanted to dynamically add subsystems to a template in my survival system
|
|
|
Post by Invector on Mar 6, 2017 16:36:38 GMT
Sure man! feel free to customize the hell out of the template and the features within, go crazy! the dynamically enum is already available on the melee combat v2.1 (vStore OK, AssetStore - pending review)
|
|
|
Post by nerdares on Mar 7, 2017 0:32:23 GMT
Sure man! feel free to customize the hell out of the template and the features within, go crazy! the dynamically enum is already available on the melee combat v2.1 (vStore OK, AssetStore - pending review) Cool man. If anyone has played around with the template and read through the read me and information text document, then maybe you can help me out? I wanna talk about a new idea I have for this system. If you recall, In my package I have a group of C# files called templates. Each one inherits vSurvivalPlayer and for every kind of character you have in your game, you need to program a template by inheriting from vSurvivalPlayer I want to change that. Instead, every character should just use a vSurvivalPlayer script. Take a look at this (its the new dynamic enum method for the controller from invector) : www.dropbox.com/s/6sp97hwmdv9myei/InvectorGameHelp.png?dl=0Let's take a look at vItemEnumsList. It looks like it has a box and inside is some kind of file called vItemEnumsList. I'm assuming this serves as a data file which contains a list of item? So think about this! I could try to do the same thing for my system. Each data file would be a list of subsystems, and you can add different subsystems inside that list file. And for each subsystem, you can customize the values! Now the question is : Ok, you have a list of the different subsystems. how will you update each? I can change the BaseSystem class to have two methods : Updateable and Initilizer. These can be virtual methods. Every subsystem inheriting this should override these methods. For every subsystem, if there is a method that you plan to continuously update, put it in the Updateable method. And for any method that needs to initialize stuff, put it in Initializer. Then in vSurvivalPlayer, we can have a method called UpdateSurvivalPlayer and InitSurvivalPlayer. So for example, we can then loop through the list of subsystems (they all inherit BaseSystem) in UpdateSurvivalPlayer, and call their Updateable method. Is this a good idea?
|
|
|
Post by nerdares on Mar 7, 2017 1:15:57 GMT
I have just made a scriptable object. It's basically supposed to store a list of BaseSystem scripts but I'm running into an issue (by the way, I had to make BaseSystem inherit from monobehavior, otherwise I cannot drag and drop scripts into the list)
My issue is the scriptable object I just created will not let me store anything in it. I can redefine the size of the list in the inspector, and of course I'll get a bunch of empty cells saying "None (BaseSubsystem)"
|
|
|
Post by nerdares on Mar 7, 2017 1:21:55 GMT
Update on the issue:
I now realize it want's me to actually drag objects that posses any BasicSystem script. This is not what I intended however. I need the user to be able to populate the list in the ScriptableObject with instances of different subsystems. He should be able to modify the values within that as well.
|
|