# How Could I Get A Combat Detection System

**URL:** <https://forums.unrealengine.com/t/how-could-i-get-a-combat-detection-system/1212747>\
**Category:** Verse\
**Tags:** combat, unreal-engine, question\
**Created:** [June 27, 2023, 8:26pm UTC](https://forums.unrealengine.com/t/how-could-i-get-a-combat-detection-system/1212747 "2023-06-27T20:26:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodeBLASTED246](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CodeBLASTED246](https://forums.unrealengine.com/u/CodeBLASTED246)\
**Post date:** [June 27, 2023, 8:26pm UTC](https://forums.unrealengine.com/t/how-could-i-get-a-combat-detection-system/1212747/1 "2023-06-27T20:26:10Z")

</div>

I just need to make it so I can stop people going through rifts when they are in combat.

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [June 28, 2023, 3:41am UTC](https://forums.unrealengine.com/t/how-could-i-get-a-combat-detection-system/1212747/2 "2023-06-28T03:41:37Z")

</div>

Hey there @CodeBLASTED246! So this is very dependent on how your game works and what type of game it is. For many games, when an AI that’s hostile sees you an `inCombat` boolean is ticked until they either lose you or are defeated.

Other games it’s like using a retrigger-able delay in which getting hit or attacking sets the `inCombat`and the delay begins to tick down, if no action triggered it again, the boolean is changed to false.

If you’d like a more tailored response, let me know what you’re working on and I can give you a bit more specifics on how I’d handle it!
