Added: 1 year ago
From: BurgZergArcade
Views: 17,821
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (67)

Sign In or Sign Up now to post a comment!
  • 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 get this error

    Cannot implicitly convert type `float' to `int'. An explicit conversion exists (are you missing a cast?)

    Pls help?

  • @TheHellhound17 nvm bout this :/ u fix in ep 12

  • 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.

  • 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 Is that from my tutorial?

  • @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.

  • @Seyhk Also, CalculateExpToLevel is not a struct, its a function. They are very different things which cant be explained in 500 characters :)

  • @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.

  • 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

  • Thanks you!

  • 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 :/

  • This may sound like a dumb question, but where is the player log? I've looked all over for it and cant find it.

  • :( 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 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

    thanx dude :)

  • 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 it should be private float Level Modifier

  • @pikmin158 Thank you very much.That was very helpful.

  • 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 I would do it. Then learn what you have to do to properly remove it.

  • i'm sorry, didn't watch the whole video, you explained it later, thanks anyway for the tutorials :D

  • What does the _ do in the variable declaration?

  • 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.

  • @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 Ah ok ;d

  • 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?

  • @BurgZergArcade hey sweet videos man. but one question:

    what is the purpose of having private variables with public setters and getters?

  • @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 ohhhh. ok! ty for the reply.

  • 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.

  • thanks alot you are very kind to share your scripts with us :) maybe we gonna play your game soon :)

  • 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?

  • @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?

  • 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

  • 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.

  • @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 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...

  • Started getting confusing when you started doing that random shit with the code, I could barely follow along with that.

  • 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

  • Great tutorials! The only problem I have with them is seeing the things you type other then that, Great tutorial!

  • 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 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.

  • It's an error shown:

    Unexpected symbol `_baseValue'

    I checked everything but it still shows it.

    Could I please get some help?

  • @wompag The only think I can think of is to make sure that you have the spelling the exact same in both scripts.

  • @BurgZergArcade It was all spelled the same, but I forgot the semicolon in the row above.

  • @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.

  • I did everything exactly like in the video and the error still is:

    Unexpected symbol `_baseValue'

    Could anyone please help me?

  • I did everything exactly like in the video and the error still is:

    Unexpected symbol `_baseValue'

  • Can you show us how to do the sliders when you can? :D

  • Thanks more one time for this series of Tutorials.

    God continue Blessing you.

  • @sandolkakos And thank you for watching :)

  • 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.

  • your tutorials doesn't stop to AMAZE me!

  • @ShadShadow92 Glad you are enjoying them!

  • @InfiniteUnity3D Hope are enjoying them, and possibly learning something new along the way.

  • @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 If you are not sure where to start, than I would start at #1.

  • @BurgZergArcade LOL!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more