Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

2. Unity3d Tutorial - Health Bar 2/2

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
36,207
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 2, 2010

Come visit us at: http://www.burgzergarcade.com

I have decided to upload the second part of this tutorial series a little early so we would have a completely working health bar system to start with.

Community donated assets can be found under the Educational section: http://www.burgzergarcade.com/catalog

Save time typing out the scripts, or just buy me some coffee: http://www.burgzergarcade.com/product/tutorials/hack-and-slash-tutorial-scripts

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (BurgZergArcade)

  • // Use this for initialization void Start () { HealthBarLength = Screen.width / 2; }

    It says me: Unexpected Symbol "Void" in class.... bla bla bla....

  • @boriswc97 check the line above it.

  • Hey i have an error where i have two gui boxes for my player, i do not have two scripts attatched or anything so i dont know what to do or what is wrong, can you help?

  • @AwesomeDude347 I have no idea what you did wrong.

Top Comments

  • Assets/Script/PlayerHealth.cs(­26,33): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement

    please help i don't know whats wrong, i've checked and double checked everything

see all

All Comments (170)

Sign In or Sign Up now to post a comment!
  • Is C Sharp better than JavaScript?

  • Great Tutorial ! Never tried C# before, but its going well, I've seen some other of your tutorials and they're easy to follow. Just a question... What is the script named "SuperSecret" for?

  • Why is it that we have to typecast maxHealth in AdjustCurrentHealth ?

  • This is great stuff. I recieved errors but only because i did somthing wrong. I have 0 expirence at any thing when it comes to game develoment, codeing ect ect. I have been playing around with unity for a few weeks now. I have the basics down pat . I am continuing to learn more of the advanced features but the codeing is where its all at in my opinion. Would some one tell me the best place to start learning C#? I just think it would take forever to learn to write code from watching these vids

  • If you finish this game, I am going to join as soon as possible and become the 'Pro' of the game.

  • I wrote the script as you did, exactly and recieved many errors, mostly that curHealth was not specified or supported, known with unity. whatever, something like that, along with others. Is the script you wrote not supported in the new 3.4.2 pro version?

  • why dont you save us all and upload scripts somewhere like mediafire??

    i just keep getting error messages like: parsing error or unexpected symbol...

  • Your computers HealthBar was nearly at 0 width too! :)

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