#Reload script issue
1 messages · Page 1 of 1 (latest)
they are
add a Debug.Log(MagazineSize + " " + BulletsLeft + " " + MagazineReserves );
also this is correct, my bad
in the reloadfinished funtion?
yessir
so i need to unarchive this one
yup
what is the number 4422? is it this add a Debug.Log(MagazineSize + " " + BulletsLeft + " " + MagazineReserves );?
yes
but it says there are 4 bullets left?
so there are bullets in magazine
maybe ui isnt updating
MagazineAmmoText.SetText(BulletsLeft + "");
ReserveAmmoText.SetText(MaxReserveAmmo + "");
it should be according to these 2 lines
they are
add them anyway, since they should say 4 but still arnt
done but still doenst subtract
hmm
have u tried to shoot through ur entire magazinereserve to check if it works, if it does then its just a ui problem otherwise u gotta rework some code
thats good!, just look thru the ui, i think i know the problem, lemme dubble check
ah i see the problem
hahahahaha
ohno
ReserveAmmoText.SetText(MaxReserveAmmo + "");
should me reserveammo
be*
also BulletSpawnpoint = transform.Find("BulletSpawner"); //Find the BulletSpawner
FPSCam = GameObject.Find("FPSCam").GetComponent<Camera>(); //find the camera
IzanagiController.GetComponent<Animator>(); //Get the animator
CanIdle = true;
BulletsLeft = MagazineSize; //When weapon spawns set to max ammo
ReadyToShoot = true; //On Spawn you are able to shoot
ReserveAmmoLeft = true; //We have reserve ammo avaiable
IzanagiFire = GetComponent<AudioSource>(); //Get access to the FireSound
IzanagiReload = GetComponent<AudioSource>(); //Get access to the FireSound
IzanagiHeavyReload = GetComponent<AudioSource>(); //Get access to the FireSound
MagazineAmmoText = GameObject.Find("WeaponAmmoText").GetComponent<TextMeshProUGUI>(); //Find the AmmoText
ReserveAmmoText = GameObject.Find("WeaponReserveAmmoText").GetComponent<TextMeshProUGUI>(); //Find the ReserveAmmoText
this is very inefficient
you should just a public, datatype and it will be more efficient
but i wouldnt if i was u, too lazy
there are going to be like 50 of these scripts
i aint attatch 20 components on 50 diffrent scripts XD
i mean you could just copy a component and it will save it
so if u do it once
boom
magazinereserves did the thing