I am making a twin stick shooter, and I have my Projectile BP class ignore any collision with my Player’s Character BP class by checking for a tag that only the Player has.
I wanted to make the behavior more versatile so any Actor BP class can us the Projectile class. I did this by having the code loop through an array called ParentTags that contains all the tags of the Parent Actor that shot the projectile.
In order to set the ParentTags variable, I created a Function called SetParentTags that passes in the Parent Actor’s tags and sets them to ParentTags.
The problem with this method is that this function is always required to be called immediately after the Projectile is created in order for my the Projectile’s collision logic to work.
I would much rather set the ParentTags variable as soon as the Projectile is created. Is there a way to modify the Construction Script so it has a parameter that’s required to be passed into it?