Script Request

Can someone PM me with a HealthBar script?? mine keeps having errors i did everything right Thanks and have a good day :slight_smile:

http://answers.unity3d.com/questions/4456

and that is for and how to add??? i not sure cuz i am new to this and my helper ditched me :frowning:

If you give me more specific information on what the problem is, I can help you out.

Okay so i need a health bar for my MMO simple but that works i did alkot of tuts but i always got errors so im trying to find a health script and maybe someone to show me how to add it

Lol sat around BSing? he couldnt even finish the thing so i could do what i need to do loser

Sir. i just dont get the errors so i wanted one that dont have any errors thats all

dude… ugh…

As much as I love watching people bicker, this thread is going nowhere fast and needs to get back on track.

EVO-Gaming, if your health scripts have errors, you can always post your code with the errors you get and we’d be happy to help.

PM me with

  • a working HealthScript PLEASE since mine has errors
    -and thats all :slight_smile:

and after this is done, you ask for a free character with animations and a gameManager-Script and a Combat-Script and…

thats what i went by lol

What problems did you have with this script? I copied and pasted straight into Unity, attached it to my player, and it worked perfectly.

Like, how do i add it, do i just make a c sharp thing ? what do i call it? do i replace ALL of the stuff in it with that? r just part?? those kinds of problems

Make a new JavaScript, delete all of the default code, and paste it in. You can name it whatever you want, and when you want to use it, drag it onto your player.

it says cannot add script cuz compilation not done yet?

Did you save it? I believe it compiles when you save the script.

lol i saved it and it says i did. but thats a progress bar i need a health bar lol

If you read the comments in the code, it tells you that you need to edit it. It’s currently tied to Time.time to show it works. Nobody but you knows how you want to apply damage.

im trying to use

using UnityEngine;

using System.Collections;



public class PlayerHealth : MonoBehaviour {

public int maxHealth = 100;

public int curHealth = 100;





//Use this for initialization

void start() {



}



//Update is called once per frame

void Update() {

}



void OnGUI () {

GUI.Box(new Rect(10, 10, Screen.width/ 2 / (maxHealth / curHealth), 20),curHealth + "/" + maxHealth );

}

}

[END CODE]

but when i drag it onto the player (first person contoller) then it says something isnt done and stuff