Display ammo count with gui

Hello
I’m trying to display the ammo count with a gui image…
when the person fires the gun
I want them to be able to see how many bullets they have left on the screen

can someone help me out with the code…
I’ve already looked at the gui code for the FPS tutorial and the 3d platformer and still can’t figure it out…

write your code …
so we can see how to help you :wink: .

Try to see FPSPayer.js and MacchineGun.js there is an example .

Try this code .

var ammoCount = 20;
var ammoGUI : GUIText ;

function LateUpdate() {

ammoGUI.text ="X "+ ammoCount ;

}

ok
I found the code in the fpsplayer and machine gun script

I’ll look them over and hopefully figure it out.

code works like a charm…
thanks a lot for the help…