Ok i just finished making all these scrips and for some reason when i hit the play button the hole set up that u have shown in the very begining of this episode part does not show up. y is that?
i ran into a problem making a script similar to yours. I recreating the rules for Dungeons and Dragons 4E. around the CalculateExpToLevel part. Because of the way DnD lvl chart is set up, the amount of exp to level can't simplify to an equation. so i have to set each level manually.
I added another int _currLevel;
public int CalculateExpToLevel() {
if (_currLevel = 1) { _expToLevel = 1000; return _expToLevel;
}
}
and i'm getting an Error: "Cannot Implicitly convert type 'int' to 'bool'"
warning! on these 7 parts there will be much jumpings through the script's and codes. Last time i did this i got many typos and got very confused and quitted. Now imma give it another try.
@BurgZergArcade Yes, i didn't realise that i typed my own variable, i was meant to type "Return _expToLevel * _levelModifier; in the struct "CauculateExpToLevel()
I'm not sure about what the function return is doing there, can you explain to me?
@Seyhk the return statement defines what value will be returned by the function its written in. In this case, when you call CalculateExpToLevel() from somewhere else, you will get _expToLevel * _levelModifier, and you could store it in a variable or use that value for other calculations, example: int whatever = CalculateExpToLevel();
I would suggest looking for some programming tutorials first if you are having trouble with this, a return statement is vital for most functions.
I fixed mine to where there are no errors Im using the most current form of unity so if you have errors try putting this : after each get and set things and crate a public int for value and you should have no more errors if you followed this exactly
public class BaseStat { private int _BaseValue; //the base value of the stat private int _buffValue; //the amount of the buff to this stat private int _expToLevel; //the total amount of exp needed to raise this skill private float _levelModifier //the modifier applied to exp needed to raise the skill public BaseStat() {
I have a problem here, it has a red underline on it. "Unexpected symbol 'public' in class, struct, or interface member declaration. Help please :/
error CS0266: Cannot implicitly convert type `float' to `int'. An explicit conversion exists (are you missing a cast?) plz help me! private int CalculateExpToLevel() { return expToLevel * levelModifier; }
@InstantGamingPro I'd suggest to return _expToLevel * (int)_levelModifier; in the CalculateExpToLevel method. Since you are trying to multiply an Integer with a Float, you would naturally end up with a float, even if its a 2 it would become 2,0. So in reality you are trying to return a float to a method that needs you to return an int ( private int CalculateExpToLevel() )
Hope this helps
private int CalculateExpToLevel() { return _expToLevel * (int)_levelModifier;
I have a question about the character's name and statistics.
I was wondering if I could skip the code to add in the name and the statistics since I would like to not have the option of naming the character and to modify the statistics.
Should I skip the Character Statistics section and move onto the next part, or will that mess up the scripting?
Hi, is there a way to fix the autocomplete facility in the MonoDevelop editor. Mines barely working at all but its seems to be working well in the videos. When I programmed before in Visual Studio Express , I preety much came to rely on IntelliSense to give programming clues & available options. Also it lets you know your on the right track. Anyway to fix it?
@Jeorney I have done nothing to monodevelop to work any differently. Only thing that I can think of is not opening it via it's icon, but instead double click a script and let Unity open it for you.
stop with stopping the video then writing and start the video again its pretty annoying if you want to write it all fast ;[ now i lost 50% of the script.
Assets/Scripts/Character Classes/NewBehaviourScript.cs(7,16): error CS1519: Unexpected symbol `public' in class, struct, or interface member declaration
hmm... yea these videos are very helpfull. but.. i vant to knoe how to add animation when you are dead. not jus stand like a super man when my health bar shows zero life points. oh right,and when i did put the health bar script in unity everything workt except,the health bar didnt appear on the screen.
@BurgZergArcade Never mind you explained it in the next video oops. I do have another problem though. My enemies don't turn blue after I deselect them. I think I already commented that on another video but I'll say it again anyway. Can you help?
Tis truly epic stuff mates. Your a genius... I saw what the little floor and moving cube turned into at a thumbnail for the swimming tutorial... THAT is a game....
OMG just what i needed man ive been lookng for c# tutorials on unity this will help me at uni cuz im doing games programming! ive already made a couple of games but i wanted solid tuts to help me more with the language thanks :)
btw will you be polishing this game ?
i know you didnt entirely finish the selected targets, so i was just wondering if you are or did go back and polish it up?
@Samirk92 I basically restarted the tutorial over at #11 as there was a lot more interest in the series than I originally expected. Right now we are going through the basics. What this means is that we just want to get something working. In the second wave of tutorials, we will go though and add a few more features, but spend most of the time polishing things up so they look cleaner and are more efficient. The last phase, we will try to make the game multiplayer.
@ZidasStudios Glad you are enjoying them. I am a little busy right now with work, but I am still managing to get a few tutorials out a week, so there should be a lots of content ahead of you to play with.
There is actually two type casting errors in this video. The fixes seem to have ended up on the cutting room floor when I was trying to get this video under ten minutes. Sorry about that. I will have the fixes at the start of the next video for anyone that is stumped because of them.
@BurgZergArcade ahhH!!!!!! im confused someone recomended me to u but i dont know whats the first tut i should watch please tell me whats the first thing i should watch n do in all of ur tutorials whats the first part?
Ok i just finished making all these scrips and for some reason when i hit the play button the hole set up that u have shown in the very begining of this episode part does not show up. y is that?
Gamer4night 1 week ago
I get this error
Cannot implicitly convert type `float' to `int'. An explicit conversion exists (are you missing a cast?)
Pls help?
TheHellhound17 2 weeks ago
@TheHellhound17 nvm bout this :/ u fix in ep 12
TheHellhound17 2 weeks ago
i ran into a problem making a script similar to yours. I recreating the rules for Dungeons and Dragons 4E. around the CalculateExpToLevel part. Because of the way DnD lvl chart is set up, the amount of exp to level can't simplify to an equation. so i have to set each level manually.
I added another int _currLevel;
public int CalculateExpToLevel() {
if (_currLevel = 1) { _expToLevel = 1000; return _expToLevel;
}
}
and i'm getting an Error: "Cannot Implicitly convert type 'int' to 'bool'"
wez201102 3 weeks ago
warning! on these 7 parts there will be much jumpings through the script's and codes. Last time i did this i got many typos and got very confused and quitted. Now imma give it another try.
adde83111 2 months ago
Hey burgzerg, what does return means in this "return _expParaLvl * _valorLvl;"
without return it doesn't work?
and thanks for the tutorials, i'm gonna watch them all ;)
Seyhk 2 months ago
@Seyhk Is that from my tutorial?
BurgZergArcade 2 months ago
@BurgZergArcade Yes, i didn't realise that i typed my own variable, i was meant to type "Return _expToLevel * _levelModifier; in the struct "CauculateExpToLevel()
I'm not sure about what the function return is doing there, can you explain to me?
Seyhk 2 months ago
@Seyhk the return statement defines what value will be returned by the function its written in. In this case, when you call CalculateExpToLevel() from somewhere else, you will get _expToLevel * _levelModifier, and you could store it in a variable or use that value for other calculations, example: int whatever = CalculateExpToLevel();
I would suggest looking for some programming tutorials first if you are having trouble with this, a return statement is vital for most functions.
losreyeseternos 2 months ago
@Seyhk Also, CalculateExpToLevel is not a struct, its a function. They are very different things which cant be explained in 500 characters :)
losreyeseternos 2 months ago
@losreyeseternos I got it, i know what a struct/function can do, i just don't know which one is struct or function, but thanks for the help.
Seyhk 2 months ago
I fixed mine to where there are no errors Im using the most current form of unity so if you have errors try putting this : after each get and set things and crate a public int for value and you should have no more errors if you followed this exactly
MrMessingaround 3 months ago
Thanks you!
beliebigerusername 4 months ago
public class BaseStat { private int _BaseValue; //the base value of the stat private int _buffValue; //the amount of the buff to this stat private int _expToLevel; //the total amount of exp needed to raise this skill private float _levelModifier //the modifier applied to exp needed to raise the skill public BaseStat() {
I have a problem here, it has a red underline on it. "Unexpected symbol 'public' in class, struct, or interface member declaration. Help please :/
ChangeofHeartz 4 months ago
This may sound like a dumb question, but where is the player log? I've looked all over for it and cant find it.
LSProductions333 6 months ago
:( i got a problem:
error CS0266: Cannot implicitly convert type `float' to `int'. An explicit conversion exists (are you missing a cast?) plz help me! private int CalculateExpToLevel() { return expToLevel * levelModifier; }
InstantGamingPro 6 months ago
@InstantGamingPro I'd suggest to return _expToLevel * (int)_levelModifier; in the CalculateExpToLevel method. Since you are trying to multiply an Integer with a Float, you would naturally end up with a float, even if its a 2 it would become 2,0. So in reality you are trying to return a float to a method that needs you to return an int ( private int CalculateExpToLevel() )
Hope this helps
private int CalculateExpToLevel() { return _expToLevel * (int)_levelModifier;
}
alu741 5 months ago
@alu741
thanx dude :)
InstantGamingPro 5 months ago
I have been following all your tutorial from 1. okk now i got a problem in this lesson.
I typed exactly what you did there.But when i try to save. it says that,
Cannot implicitly convert type float to int. An Explicit conversion exists (are you missing a cast?)
this is what i typed:
----------------------------
private int LevelModifier { get{ return _levelModifier; } set{ _levelModifier = value; }
----------------
I cannot go any further if i cant complete this lesson.Please help me.
rafsanraymond 7 months ago
@rafsanraymond it should be private float Level Modifier
pikmin158 7 months ago
@pikmin158 Thank you very much.That was very helpful.
rafsanraymond 7 months ago
I have a question about the character's name and statistics.
I was wondering if I could skip the code to add in the name and the statistics since I would like to not have the option of naming the character and to modify the statistics.
Should I skip the Character Statistics section and move onto the next part, or will that mess up the scripting?
InsanityLaughsxD 8 months ago
@InsanityLaughsxD I would do it. Then learn what you have to do to properly remove it.
BurgZergArcade 7 months ago
i'm sorry, didn't watch the whole video, you explained it later, thanks anyway for the tutorials :D
runetimon 8 months ago
What does the _ do in the variable declaration?
runetimon 8 months ago
Hi, is there a way to fix the autocomplete facility in the MonoDevelop editor. Mines barely working at all but its seems to be working well in the videos. When I programmed before in Visual Studio Express , I preety much came to rely on IntelliSense to give programming clues & available options. Also it lets you know your on the right track. Anyway to fix it?
Jeorney 9 months ago
@Jeorney I have done nothing to monodevelop to work any differently. Only thing that I can think of is not opening it via it's icon, but instead double click a script and let Unity open it for you.
BurgZergArcade 9 months ago
stop with stopping the video then writing and start the video again its pretty annoying if you want to write it all fast ;[ now i lost 50% of the script.
TrailerFarm 9 months ago
@TrailerFarm This was the only way to get it under 10 minutes. All of the code is there, you just have to pause it.
BurgZergArcade 9 months ago 4
@BurgZergArcade Ah ok ;d
TrailerFarm 9 months ago
Assets/Scripts/Character Classes/NewBehaviourScript.cs(7,16): error CS1519: Unexpected symbol `public' in class, struct, or interface member declaration
Please, can you tell whats' the error is?
tecnopro90000 10 months ago
@BurgZergArcade hey sweet videos man. but one question:
what is the purpose of having private variables with public setters and getters?
coolshoos 1 year ago
@coolshoos Since I am just quickly prototyping it out, so I am just leaving room to come back and add code later that may be needed.
BurgZergArcade 11 months ago
@BurgZergArcade ohhhh. ok! ty for the reply.
coolshoos 10 months ago
hmm... yea these videos are very helpfull. but.. i vant to knoe how to add animation when you are dead. not jus stand like a super man when my health bar shows zero life points. oh right,and when i did put the health bar script in unity everything workt except,the health bar didnt appear on the screen.
aviatorsx7 1 year ago
thanks alot you are very kind to share your scripts with us :) maybe we gonna play your game soon :)
umaga342 1 year ago
Hey, I bought the scripts, and everytime I attach the basestat script to main camera it says The script needs to derive from monobehaviour. Any help?
IntelGMAGuy 1 year ago
@BurgZergArcade Never mind you explained it in the next video oops. I do have another problem though. My enemies don't turn blue after I deselect them. I think I already commented that on another video but I'll say it again anyway. Can you help?
Jaser200 1 year ago
BaseStat.cs(32,22): error CS0266: Cannot implicitly convert type `float' to `int'. An explicit conversion exists (are you missing a cast?)
BaseStat.cs(37,17): error CS0266: Cannot implicitly convert type `float' to `int'. An explicit conversion exists (are you missing a cast?)
sorry but I'm not sure what's wrong
Jaser200 1 year ago
Tis truly epic stuff mates. Your a genius... I saw what the little floor and moving cube turned into at a thumbnail for the swimming tutorial... THAT is a game....
InfinitiveGD 1 year ago
OMG just what i needed man ive been lookng for c# tutorials on unity this will help me at uni cuz im doing games programming! ive already made a couple of games but i wanted solid tuts to help me more with the language thanks :)
btw will you be polishing this game ?
i know you didnt entirely finish the selected targets, so i was just wondering if you are or did go back and polish it up?
Samirk92 1 year ago
@Samirk92 I basically restarted the tutorial over at #11 as there was a lot more interest in the series than I originally expected. Right now we are going through the basics. What this means is that we just want to get something working. In the second wave of tutorials, we will go though and add a few more features, but spend most of the time polishing things up so they look cleaner and are more efficient. The last phase, we will try to make the game multiplayer.
BurgZergArcade 1 year ago
@BurgZergArcade no problem man ill be going through every one of your videos :)
can't wait to see how it turns out!
are you a game programmer or do u just do this as a hobby?
Samirk92 1 year ago
@Samirk92 It is just a hobby. Every so often I actually polish something up enough that I release it for others to play :)
Most of the things I do are more of a proof of concept that I end up subjecting my friends too. The last one was a multiplayer 3d Tic-Tac-Toe game...
BurgZergArcade 1 year ago
Started getting confusing when you started doing that random shit with the code, I could barely follow along with that.
HumanLies 1 year ago
I've got an error...
Assets/scripts/Charecter Classes/BaseStat.cs(7,16): error CS1520: Class, struct, or interface method must have a return type
impwarior 1 year ago
Great tutorials! The only problem I have with them is seeing the things you type other then that, Great tutorial!
EveryOneLovesCharli3 1 year ago
Hey Mate
Just wanted to show my thanks for these videos. Its really good of you to produce these videos and I am slowly working my way through them :)
ZidasStudios 1 year ago
@ZidasStudios Glad you are enjoying them. I am a little busy right now with work, but I am still managing to get a few tutorials out a week, so there should be a lots of content ahead of you to play with.
BurgZergArcade 1 year ago
It's an error shown:
Unexpected symbol `_baseValue'
I checked everything but it still shows it.
Could I please get some help?
wompag 1 year ago
@wompag The only think I can think of is to make sure that you have the spelling the exact same in both scripts.
BurgZergArcade 1 year ago
@BurgZergArcade It was all spelled the same, but I forgot the semicolon in the row above.
wompag 1 year ago
@BurgZergArcade It was all spelled the same, but I forgot the semicolon in the row above. Could you please look at my question about tutorial 10.
wompag 1 year ago
I did everything exactly like in the video and the error still is:
Unexpected symbol `_baseValue'
Could anyone please help me?
wompag 1 year ago
I did everything exactly like in the video and the error still is:
Unexpected symbol `_baseValue'
wompag 1 year ago
Can you show us how to do the sliders when you can? :D
A0den 1 year ago
Thanks more one time for this series of Tutorials.
God continue Blessing you.
sandolkakos 1 year ago
@sandolkakos And thank you for watching :)
BurgZergArcade 1 year ago
There is actually two type casting errors in this video. The fixes seem to have ended up on the cutting room floor when I was trying to get this video under ten minutes. Sorry about that. I will have the fixes at the start of the next video for anyone that is stumped because of them.
BurgZergArcade 1 year ago
your tutorials doesn't stop to AMAZE me!
ShadShadow92 1 year ago
@ShadShadow92 Glad you are enjoying them!
BurgZergArcade 1 year ago
@InfiniteUnity3D Hope are enjoying them, and possibly learning something new along the way.
BurgZergArcade 1 year ago
@BurgZergArcade ahhH!!!!!! im confused someone recomended me to u but i dont know whats the first tut i should watch please tell me whats the first thing i should watch n do in all of ur tutorials whats the first part?
Carlocap11 1 year ago
@Carlocap11 If you are not sure where to start, than I would start at #1.
BurgZergArcade 1 year ago
@BurgZergArcade LOL!
Carlocap11 1 year ago