|
Post by dreadlord on Sept 6, 2016 18:30:36 GMT
Hey jgiroux,
thank you for all this! Keep in mind that i owe you a couple of cold beers :-)
Works flawless with a Character in Szene but i tried to use the GameController with a Spawn Point and the Player Prefab. When the GameController instantiates the Player prefab, all the UI elements from your scripts are gone and i can#t assing them to the prefab.
|
|
|
Post by jgiroux on Sept 10, 2016 16:21:08 GMT
I can look into this. im guessing a simple don't destroy on load (in game controller script) and possibly adding your GUI elements onto your player prefab, but Ill take a look for sure before end of this weekend and update you. FYI, im a craft beer kinda guy
|
|
|
Post by dreadlord on Sept 12, 2016 0:43:35 GMT
Thanks for all your effort. Here in Germany craft beers are not very popular but we have a couple of good traditional beers 🍻
|
|
|
Post by projectonegames on Sept 19, 2016 19:35:53 GMT
This add on adds very significant features to this product. And the instructions are dead on. It took me about 30 minutes to add it and another 45 to extend it and customize it. NO errors in the code. Now I can display level information and other variables, like max health and stamina. I am wondering about how to share experience between the player and the companion. This product keeps getting better and better!
|
|
|
Post by Chronicman on Sept 30, 2016 16:02:24 GMT
This add on adds very significant features to this product. And the instructions are dead on. It took me about 30 minutes to add it and another 45 to extend it and customize it. NO errors in the code. Now I can display level information and other variables, like max health and stamina. I am wondering about how to share experience between the player and the companion. This product keeps getting better and better! Note: I wrote this on my phone could not test and might be some syntax errors This could be achieved quite easily, First we are gonna need to create a list. Probably in the InvectorAddon.cs Lets call it PartyMemebers. Now in the start function you will need to find the party members using the FindGameObjectsWithTag("Player"); and assigning it to the list and do that with companion as well. Next we need to move to the InvectorAIAddon.cs in the iDeath function it will distribute the xp. this is the section we will need to add our new code. //checks to see if our party list is above 0 if (Player.GetComponent<InvectorAddon>().PartyMemebers.count > 0) { //divides the xp by the amount in the party int sharedXP = XPGainedOnDeath \ Player.GetComponent<InvectorAddon>().PartyMemebers.count; // loops PartyMemebers and adds the divided xp for (int i = 0; i < Player.GetComponent<InvectorAddon>().PartyMemebers.count; i++) { Player.GetComponentInParent<InvectorAddOn>().PartyMembers.GetComponentInParent<InvectorAddOn>().m_XP = Player.GetComponentInParent<InvectorAddOn>().m_XP + sharedXP; } }
|
|
|
Post by Chronicman on Sept 30, 2016 16:26:56 GMT
Just wanted to share this with you guys. Its a XP calculator instead of trying to figure it all out on a calculator. Note its not to fancy but does the trick. To install Create a new script called XPCalculator and paste the code inside and attach it to a game object in your scene. using UnityEngine; using System.Collections; using System.Collections.Generic; public class XpCalculator : MonoBehaviour { public bool Generate; [System.Serializable] public class calculator { public int Level; public float BaseXP = 25; [Range(1, 10f)] public float Percent = 0.5f;
} public List<calculator> CalList = new List<calculator>();
void Start () { }
void Update () { if (Generate) { for (int cnt = 1; cnt < CalList.Count; cnt++) { CalList [cnt].Level = cnt; CalList[cnt].BaseXP *= CalList[cnt].Level * CalList[cnt].Percent; int tmp = Mathf.CeilToInt (CalList[cnt].BaseXP); Debug.Log("Level" + " " + CalList[cnt].Level + " " + "XP" + " " + tmp);
} Generate = false; } } }
Steps on how to use:
1) Add 1 element to the CalList.
2) Set the base XP (this is the amount it will be X by per level)
3) Set the percent amount, this will add an additional amount , leave at 1 if you don't wish to use this
4) Set the element list to the amount of levels you wish to use, by default unity will copy the last element you created . Note: Lists start at 0 and this will be ignored in the code, so if you want 20 levels you will need to have 21 elements.
5) Press play and select your new game object press the generate bool and look in the Console for the info. Remember to press stop before filling in you XP list, the generated info will still be in your console.It will tell you the amount of xp for each level now you will have to copy that into your level list. repeat process if you don't like the amount generated
|
|
|
Post by Legion on Oct 3, 2016 22:48:07 GMT
Hi, I just discovered your addons, they're awesome, thank you very much. I'm having problems with the temperature zones, they don't work with the latest version of the Invector's plugin, the Frosty addon doesn't work either, I tried with getting cold, etc and with triggered zones. Greetings
|
|
arkas
Junior vMember
Posts: 40
|
Post by arkas on Oct 4, 2016 0:08:57 GMT
Thank you jgiroux
|
|
|
Post by jgiroux on Oct 4, 2016 16:25:39 GMT
Hi, I just discovered your addons, they're awesome, thank you very much. I'm having problems with the temperature zones, they don't work with the latest version of the Invector's plugin, the Frosty addon doesn't work either, I tried with getting cold, etc and with triggered zones. Greetings Let me re-visit the code tonight, that was written using an older version of Invectors template. It may be outdated a little. plus I will be releasing Asset Packages for all my add-ons, so you wont have to self-write all these codes//scripts by hand, you can just import them in give me till tomorrow afternoon and I should have the above Add-On all squared away for you. that being said, everything else seems to be working as intended though?
|
|
|
Post by jgiroux on Oct 4, 2016 16:26:26 GMT
You are most welcome! glad people are getting some use out of these
|
|
|
Post by Legion on Oct 7, 2016 13:27:27 GMT
Yup, everything is working fine except temp zones.
|
|
|
Post by jgiroux on Oct 7, 2016 19:59:51 GMT
Working on the issues as I write this, update should be available sometime this evening.
|
|
|
Post by Legion on Oct 7, 2016 21:06:39 GMT
Thanks!
|
|
|
Post by jgiroux on Oct 7, 2016 21:08:48 GMT
Frosty Effect isn't working.
This one I can answer right away, and I will edit my notes to reflect this, but when you dragged the FrostEffect script onto your Camera, it needs to be *enabled* , I believe the default is disabled, so just hit the little check mark and try it, should work fine for you. let me know if that fixes that part of the code for you.
|
|
|
Post by jgiroux on Oct 7, 2016 21:22:27 GMT
Yup, everything is working fine except temp zones.
lol, looks like I can fix this one for you really quick as well, see my system takes care of the enabled/not enabled fade in/fade out but it starts with what it is given and in your case , my guess is that you have the *Image* (script) of your GUI image disabled as well. Just check them to be enabled (yeah its a pain since now in your viewport you will always have it showing, but you can disable to not see it while your working on stuff, then just remember to re-enable it when playtesting or doing a final build.
see image for a better idea of what I mean:
|
|