How to put actors in an array and call them



I want to create a system where you can have a weapon by putting it in your inventory and equipping it.
Even if you set the actor to an array and try to call it, it will be Not Valid.
I’m Japanese and I’m using a translator, so I’m sorry if it’s hard to understand.

Just to check: this will not work unless the index is already in the array

image

So, you might need the ‘size to fit’ checkbox.

Also, making an array of weapon types will not allow you to use them. Just having the correct variable type, is not enough. There needs to be an actual ‘instance’ of the actor for you to equip it.

In other words, to equip one of these weapons, you need to ‘spawn’ it. ‘Spawn actor of class’, to make a real weapon. Then you can use it :slight_smile:

Hi there @diobrando5050,

This topic has been moved from International to Programming & Scripting: Blueprint.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing!