In a Beat Em Up style game, I want to check if there is any weapon in the screenbox (screen size box collision), and if so, the NPC’s will try to go for them instead of going to the player.
I imagine I will have to make an array and some how connect all those actor blueprints (each weapon has its own blueprint) to it.
I see where to make a variable into an array, and even add inputs at the bottom, but I can’t seem to get it to select those actor bp’s. And do I need Object Types - Actor - Object reference OR class reference for what I’m trying to do? Thanks
Ok I have created an empty blueprint (called WeaponMasterDummyBP) and added child actor components and set them accordingly to look for each weapon bp.
But what would you suggest to check if ANY weapons are overlapping the “screenbox” (which is inside the camera actor btw and moves parallel with the tpc), and if so, that would I think have to set an NPC on like a “quest” to try to go to and pickup / attach the weapon.
I suppose once even one NPC goes for one weapon, that weapon then would have to have something set so that no other NPC seeks for that same weapon.
Any help is greatly appreciated Clockwork, thanks again!
Ahh ok I see it now, that wasn’t too bad. I have that get all actors of class plugged into a For Each Loop. When that checks that, will it be going through all the children names in alphabetical order or how does that work?
I moved three weapons into the starting position just to see if it worked. Seems to have worked. It shows for 2 seconds and then disappears I guess that is the default setting for a print string.
All the stuff that’s common between the blueprints, like how you pick them up and put them down ( or stuff like that ), can just go in the parent. So you only have to write it once.
For instance, that ‘available’ bool. You don’t actually need it, but if you did, you put it in the parent.
Repeating yourself, is the sign that stuff needs to go in the parent. So, if you always want to know if a weapon is available, the bool goes in the parent. Then you can say