Trigger box breaks on AI entry
Hey, I have a simple trigger box that takes damage when the player is overlapping it, the blueprint logic is below for reference:
Everything works fine until something else (ie. AI) overlaps the trigger box, this breaks my code.
The collision settings for the trigger volume are below:
Thanks in advance for any help.
asked Mar 25 '19 at 02:49 PM in Blueprint Scripting
Found the fix. Made another cast inside the loop with a reference to the player character, all working now.
answered Mar 26 '19 at 04:17 PM
Not sure exactly what you mean by it "breaks", that could be many things some clarification would help. BUT from what I can see, you will certainly have a bug where if the player enters the trigger box and begins taking damage, if an AI enters then leaves the trigger box the player will stop taking damage even if he is still within the trigger volume. The reason for that is because you don't specify an actor for the "End Overlap" event. So any actor (even an AI actor for example) could cause the "End Overlap" event to trigger upon exiting the volume. Cast to your third person character for the end overlap like you did for begin overlap and it will resolve that issue. If you are having another issue please clarify because I don't know from the screen shots what exactly would be "breaking" other than what I mentioned above.
answered Mar 25 '19 at 11:33 PM
Nebula Games Inc
Follow this question
Once you sign in you will be able to subscribe for any updates here