good morning guys, i’m having a problem with my protection, when i put more than one actor with the same variables it seems that the variables are in conflict, I think it’s just because they all use the same set of variables (which are not arrays in my case) and conflict with each other, I tried to get a actor all of class together with a for each loop but it didn’t work, whenever I put more than one level of that actor it overwrites the another, if someone knows something it will help a lot!
They are all trying to interact with the same weapons in the level at the same time, so of course they’re in conflict. You need to establish some conditions for their interaction with the weapons. Like check if a certain weapon is already taken by another actor, etc.
how could i do this for example?
You need to provide more information on what exactly you’re trying to do.
basically my AI spawn with the weapon I selected, when I put more than one AI with a different weapon it gives the problem that I had mentioned above
Get All Actors of Class returns all the actors in the level. If you want an AI to use a certain weapon, you can spawn it specifically for that AI. E.g. when you spawn an AI and it’s a sniper, you can spawn a respective weapon On Begin Play in the AI blueprint, and save it to a variable right away.