# No BREAK statements when working with For-Loop?

**URL:** <https://forums.unrealengine.com/t/no-break-statements-when-working-with-for-loop/2196621>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [December 10, 2024, 7:39pm UTC](https://forums.unrealengine.com/t/no-break-statements-when-working-with-for-loop/2196621 "2024-12-10T19:39:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shoka](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shoka/32/1169404_2.png) [@Shoka](https://forums.unrealengine.com/u/Shoka)\
**Post date:** [December 10, 2024, 7:39pm UTC](https://forums.unrealengine.com/t/no-break-statements-when-working-with-for-loop/2196621/1 "2024-12-10T19:39:32Z")

</div>

Is it possible to easily break from a for-loop after a certain criteria is met, like finding a specific ID or name?

Normally I would use something like a BREAK statement or even CONTINUE depending on the context, but I can’t see to find something like this in verse (break is limited to LOOP)

I did a workaround, like (if value found is X, set a logic operator Y to TRUE. If Y= true, stop executing stuff at the end of the loop, until the iterations are done) or even using a LOOP instead of for-loop.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/7/3973bb7fc6e2b72d88b733bb7c422934e085bc3a.png)

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [December 10, 2024, 10:41pm UTC](https://forums.unrealengine.com/t/no-break-statements-when-working-with-for-loop/2196621/2 "2024-12-10T22:41:08Z")

</div>

Here you go 😃

```auto
var IsHolding : logic = false
loop:
    for(Weapon : ForbiddenWeapons, Weapon.IsHoldingItem[Player]):
        set IsHolding = true
        break
    break

```

That’s the only way to do that for now

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 9, 2025, 10:41pm UTC](https://forums.unrealengine.com/t/no-break-statements-when-working-with-for-loop/2196621/3 "2025-01-09T22:41:44Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
