Ammo not reduce will holding LMB

i have problem with my blueprint, if i click LMB the ammo is reduce but if i holding LMB the ammo not reduce(Only 1)
this the video Video


firing logic

reloading logic

line trace logic (this is weapone blueprint not character)

if somoene can hel please put the code in blueprintue

You should promote your timer out pin to variable after the full auto event and in the stop full auto you need to use that timer variable in order to clear the already set timer.

promote the timer (event) in float? relaod logic and fire in character blueprint, lien trace logic in weapone blueprint that separate, cast? if you can please screenshot what you mean, i not too much to learn unreal

I made an example project showing the implementation
R for reload. Pure logic so no gun or animations just ui ammo count and line trace.


editor is empty
but i can the file see in directory

Its a 5.1 project. Which version are you using? If lower try right clicking the uproject file and lowering the version.


sv2

i can’t copy blueprint form you to my blueprint, can you see my project

integer is currentAmmo,totalAmmo,maxClipSize,tempAmmo

My project

Personally I would move the current ammo and max ammo to the weapon and not keep it in the character. Then call events on the weapon like reload / fire etc

You will need to regenerate the visual studio project and run the project from it. (it’s in the right click of the uproject file)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.