Download

Actors with Different Stats.

I’m trying to have multiple actors spawn randomly in a level, but I want each of them to have random stats (like health or attack). I was able to get them to spawn but I can figure out how to call on a certain one for a battle. I’m trying to make a turned based battle mechanics like pokemon. To make sure I’m explaining this clearly enough heres a recap. I have several of the same actor in a level all with different stats, and I’m trying call on just one’s stats for a battle. Thanks for the help.

Hey,
so how are you storing the different stats inside your actor?
If you use an array of integer values (e.g attack = 5) i would simply set the value of every stat to a random integer (random integer in range node) on Begin Play.
Every of your actors would have the same stats but different values assigned to them.
Hope i could help you :slight_smile:

I have something like that set up, but how do I call on a specific one of those actors for a separate blueprint. Thanks for the help :slight_smile:

Well, depends on how you want to interact with a specific actor. The most common way is to scan for the nearest one and play with that one. Get All Actors of Class (that class) > For Loop through them to find closest one > Winner of that Loop gets the interaction prize.

You can get all actors as an array and with the array you can handle nearly everything…