- Home /
bullet bar instead of numbers
i want to make a bar for the bullets and not a number... like the haelth bar but for ammo. i am using the tutorial and have no idea how. any help?
Answer by cncguy · Jul 07, 2010 at 07:21 PM
Use something like the following:
var bulletTex : Texture2D;// assign this in the editor var numBullets : int = 5;
function OnGUI() { for(var i=0;i<numBullets;i++) GUI.DrawTexture (Rect(10,10+i*bulletTex.height,bulletTex.width,bulletTex.height) ,bulletTex,ScaleMode.StretchToFill,true); }
this will draw 5 bullets in the top right corner of the screen moving down the screen each bullet.
Answer by TaigaStudios · Jul 06, 2010 at 07:58 PM
You can use the healthbar code from the Fps Tutorial Or if youre looking for something with professional look and ease to use you could check out EZ GUI from anbsoft.com 49,95$ for single user, studio licence 225$
EDIT: I also found this amazing weapon tutorial: DastardlyBanana
Your answer
Follow this Question
Related Questions
Simple GUI In game 1 Answer
I have yet more problems with gui and bullets Help please 1 Answer
NotificationCenter Help Needed 0 Answers
Reduce Draw call for Multiple GUI Textures with same Texture 1 Answer
health bar questions 1 Answer