I’m trying to retrieve the “CurrentAmmoInClip” data from the C++ Class “Shooter Weapon” (C++ Classes, Shooter Game, Public, Weapons" in order to use this information as an RTPC in Wwise (to change the sound of the gun as ammo decreases).
I’ve looked around for an answer and have been guided to add the variable to the blueprint editor using:
/** current ammo in clip */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category=Ammo)
int32 CurrentAmmoInClip;
Which successfully adds this to the config of the weapon, but it doesn’t allow me to create a node that will retrieve the data. Am I missing something? It seems I’ve done everything I need to, As far as I can tell from this guide:
Any ideas? Sorry if this is really simple, I’m quite new to C++.
I think you need to add EditAnywhere or BlueprintReadWrite to the UPROPERTY to edit the variable in the blueprint, currently, you can only read the variable in blueprints
Whereby “Music Skill Level” would be “CurrentAmmoInClip”. I can’t seem to allow it to create the node for this. I assume it has to be a reference? Similiar to “reference to self”, but the node simply isn’t there to be added to the blueprint.