Adding Ammo Count to Game.
I've been attempting to add this functionality for quite some time now. However, it seems that I’m overlooking something.
So I want to add an ammo count, a single ammo count similar to that of Quake or Doom. With ammo pickups distributed throughout the map. The gun can fire up to 10 times then stops, but when I attempt to reload by overlapping with an ammo pickup the the static mesh does not respond. The static mash parent is a blueprint (actor) its parent class is ammocrate.cpp (below) which is also a actor. This is what I've done so far.
Afterwards I created a OnReload() function similar to the OnFire() function, where I call it from the First Person Character.
I's set up a UE_LOG call on the OnReload function it does not even log out that the ammo crate has been overlapped with, what am I missing here ?
asked Aug 06 '18 at 07:34 AM in C++ Programming
Now I am not quite sure what your object hierarchy is but only one of these will ever succeed as OtherActor is of a single type (AFirstPersonCharacter, AMannequin or AGun ).
You should somehow get your AGun variable from inside of FPCharacter or TPCharacter (not sure which one holds it in your game)
answered Aug 06 '18 at 08:58 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here