I have an integer variable (named CubeAmount) set up on my BP_FirstPersonGameMode. I have successfully modified the gun in the unreal FPS template project to spawn a BP Actor named BP_Cube (a basic BP Actor with a Cube static mesh component) at the point where it’s projectile hits something. On the spawned cube BP I have successfully set it up to increment CubeAmount by 1 on EventBeginPlay so that CubeAmount essentially equals the amount of cubes actors the player has spawned in the level with the “cube-spawning” gun. This is all working fine.
I have placed another BP Actor in the scene (BP_Sphere) and I want to trigger events on BP_Sphere blueprint when CubeAmount has reached certain amounts (let’s say 5, 10 and 15). I can’t figure out the best way to do this. I have tried using EventTick and checking CubeAmount is equal to 5, but this of course constantly triggers when CubeAmount is at 5, and this doesn’t suit my purpose (I also understand this is quite inefficient).
I have also tried an Event Dispatcher on BP_Cube, and tried binding/assigning the dispatched event on BP_Sphere to have BP_Sphere check CubeAmount every time a BP_Cube is spawned, but tutorials I’ve followed don’t explain clearly how I can bind/assign to my spawned BP_Cube. I may very well be doing this wrong, but I also feel like there must be an easier way for BP_Sphere to check if CubeAmount changed and check what CubeAmount is at that point only.
Many thanks for the help. I am new to Unreal and Blueprints, with no coding experience and only youtube tutorial knowledge.