Clear whole array(with items in it) using 'C' key and replace it with new items

Hi everyone
The BP in the picture is from my spawner class, which contains array named “PickupType” with mine 4 pickup-items in it
I also have a spawnpoint BP class - just a cube mesh, in which a random pickup-item from my array(PickupType), spawns. I have 2 spawnpoint cubes in my map - they spawn 2 random items from my 4total when I start the game.
I want, when I am in the game and press C-key from my keyboard - the whole array to be cleared and when I press C-key again to be fill-ed with new random items, so that each time I hit C-key, all of the pickups on my map will change.

This should do the trick:

][1]

Sorry, but I do not get it. On my map I have - 1 spawner and 2 spawnpoint cubes - when I start the game these 2 cubes spawn two random items from my total three possible items . I add these 3 items to “pickup type” of my spawner

322784-ty.png

What is “Spawned Actors”, I do not have it ?

You make it. It’s an array of actors :slight_smile:

It’s different

It’s an array:

That’s right, but if you copy the code it will work. Just make a new variable array of type actor…

I can’t connect these

make a new clear node by dragging from the spawned actors variable ( the other is not the same type )

( gettin’ there… :wink:

When I start the game my spawner spawns corectly, 2 random pickups in my 2 spawnpoints. But When I press C, nothing happends - the pickups stay the same
This is all I do

Thank you a lot for your help.
I think I am almost ready, but I have 2 more questions.

  1. What is “classes” and can I put “pickup type” instead
  2. Where to put my 3 possible pickup-items- in spawned actors or pickup type ?

Class IS supposed to be your pick up type array. Just put it in there…

Excellent :slight_smile:

Ok, need to check your blueprint. You need two things:

1 Input must be enabled:

2 Consume input must not be checked:

There are not enough words to thank you all for your help. All things are working now.
God bless you, and have a good day :slight_smile: