Problem with counting ammunition

Well as i said in topic i have problem with counting ammunition. I can’t add movie beacuse of enlargment of this video. When ammo hits 0, gun stop shooting but it still count the numbers to infinity and if you right click (aiming) you can still shoot, aiming dosen’t care about numbers and last problem is that reload dosen’t reset ammo :confused: Im new do this so if some can explain and help me how to repair it will be very nice :slight_smile: have a nice day

First off you need to add a condition to the Left mouse pressed Branch … AND ammocount > 0. Nip a lot of headaches in the bud.

All “Can I do this?” logic should be executed before any action is taken.

Only Deduct ammo after the shot has taken place.

So …

  1. Can I Fire ( Has ammo?, Not Reloading?, Not Sprinting?) ->
  2. Is ADS? (iron sights) -> TRUE: Ironsights logic, FALSE: Hip Logic. ->
  3. Spawn Projectile ->
  4. Montage ->
  5. Sound ->
  6. Emitter ->
  7. Deduct Ammo

Can I Fire Branch (False) -> AmmoCount == 0 -> True : Reload, False : do nothing.

Thank you for response, i will try to do it tomorrow :wink:

No problem. Personally I’d take a step back and look at the broader picture of what you plan to eventually produce. Map out all the functionality the end result should have, then approach the logic flow.

Firing modes (single, burst, full auto) … Handling rate of fire, multiplayer support etc.

Well you got me, before i response i have to tell you a story. I’m on second year in high school at IT, we had programming with c++, java nad others but we were taught to pass exam, not to make a game. One professor says that if someone want highest grade in his class you have to make something like page, game or some script. I like take challanges so me and my friend decided to make game, he’s making map and i am responsible for logic and function, now we want just to make game with like 2-5 diffrent tasks and show it to teacher to get grade, after this maybe we will keep going. The hardest think is that no one explain how it exacly work, you can find a lot of tutorials how to make ammo how to make reload how to add gun, but i can’t find video where someone will be explaing step by step what is doing for example brench next sequence and other, and this is the biggest problem :confused: I have to apologize to you for my english, I hope you will understand everything i wanted to tell you, have a nice day

Now, I’m going to take your tips and try to repair it :slight_smile: Later i will tell you if i do it ;DDD If you want to speak with me or smth you can add me on discord and we can write to each other, but still thank you for response. It’s hard to find help

Sooo a couple minutes later everything works fine but while shooting full auto it’s still coutning to infinity :confused:

Update: I did it, thank you very much for all tips and help :slight_smile:

Congrats :slight_smile: . Proper logic flow is the key.