I am making an enemy wave system that uses a lot of customizable variables. All the variables I made in the level BP work great, but they all rely on a boolean that is set in the enemy’s BP. I feel like my problem may be a bug, but it is probably my inexperience. My problem is that I use another variable “Aitest reference” to get a reference to the enemy, and therefore the boolean. That alone works fine when it is connected to the main node/branch, however it stops working whenever anything preceding the branch in the chain, or the branch itself, gets connected to any kind of event. It says that the “Variable is not in scope” and just does not work. It works if I just drag the AItest BP (my enemy) straight into the level and destroy that actor, but not when I use “Spawn Actor From Class”. The variable that is not working is “Was An Enemy Killed? (AI)”.
This is the AItest BP thing:
The variable inside of the Level BP, connected to a Branch which has an Event going into it (shows it is not in scope):
The variable inside of the Level BP, connected to a Branch which is NOT connected to an event (variable is now in scope):
Where/how the AItest enemy is spawned:
One failed attempt at resolving the problem (Variable was still not in scope):
Note:
-
Every Variable is set to “public”
-
Please don’t just tell me to CastTo AItest if that’s the solution, please show me how, as I tried already without success.
-
I’m spawning it as an actor and not AI since it is just a simple “Move to player” thing and doesn’t actually use an AI Controller Class
-
Any alternate suggestions for the same/similar effect would be greatly appreciated
-
I’m still extremely new to Unreal Engine 4, but I’ve got a basic understanding’