Drop Ammo Stacks - Change actor after spawning it?

Hi, In my inventory system I’m trying to drop stacks of ammo and items. Once I spawn the actor how can I change the quantity on it. I have searched everywhere for an answer but I only find lots of incomplete answers. I’m sure you have to use the return node and somehow access and set the actor… an example would be awesome.

Each spawned blueprint is an element in the game world.

Each element has a set of properties (functions and variables).

In your case the element would be the AmmoStack and one of its property would be AmmoCount.

From what I understand you want to modify the AmmoCount property on the AmmoStack items currently alive in the world.

An element can access his own properties but can’t access others’ unless he has a “reference” to another element. Which means that the AmmoStack can modify its own property if he wants to, but I guess it’s not what you’re trying to achieve.

My guess would be that you want to set the AmmoCount property on your AmmoStack at the moment the player drops it?

So what you have to do is to get a reference to your AmmoStack at the moment you drop it and set its AmmoStack property at that moment to the value you want.

How to get a “reference” of something?
Well it depends on what it is, usually everything you spawn can be stored in a variable of the type of the thing you spawned (for instance if you spawn an AmmoStack, the “Spawn actor from class” node returns you a blue pin which corresponds to the reference of the AmmoStack that it spawned, you can grab that pin and store it in a variable, this will give you a reference to it).

In your case you have to be more specific if you want me to help you further:
What blueprint class is responsible for spawning / modifying your AmmoStack?
To what value should be set its AmmoCount property?