# How to code a "Stay 2 seconds on the ground" win condition ?

**URL:** <https://forums.unrealengine.com/t/how-to-code-a-stay-2-seconds-on-the-ground-win-condition/2148603>\
**Category:** Verse\
**Tags:** unreal-engine, unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [November 24, 2024, 4:51pm UTC](https://forums.unrealengine.com/t/how-to-code-a-stay-2-seconds-on-the-ground-win-condition/2148603 "2024-11-24T16:51:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_wn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_wn](https://forums.unrealengine.com/u/_wn)\
**Post date:** [November 24, 2024, 4:51pm UTC](https://forums.unrealengine.com/t/how-to-code-a-stay-2-seconds-on-the-ground-win-condition/2148603/1 "2024-11-24T16:51:21Z")

</div>

Hello everyone,

I want to code the win condition of my game is to stay on the ground for 2 or more seconds,  
how can i code this in Verse ?

Thanks

---

<div class="post-metadata">

**Author:** ![ok\_studios](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ok\_studios](https://forums.unrealengine.com/u/ok_studios)\
**Post date:** [November 29, 2024, 4:14am UTC](https://forums.unrealengine.com/t/how-to-code-a-stay-2-seconds-on-the-ground-win-condition/2148603/2 "2024-11-29T04:14:42Z")

</div>

Hi,  
You’re in luck!! There is a method in the Verse API that checks exactly for that condition. You would simply get a reference to the FortCharacter, and use the IsOnGround.

 ![Screenshot 2024-11-28 221138](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/d/5/9d58a858c41abc79070ff9ded460e52df7983a82.png)

To give you an idea of what the code would look like, watch this tutorial. In it, instead of using IsOnGround, he is using IsCrouched, which works the same way.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/8/0281c2c49c2a172714e1f39dc073157ed6c1e40e.jpeg "Make Your Player Invisible in Fortnite! UEFN / Creative 2.0") ](https://www.youtube.com/watch?v=0o6n1FXkNFU)

More specific, something like this:

 ![Screenshot 2024-11-28 224001](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/e/b/9eb9438e1ab44b5d00f9b79eecab957c7e83220c.png)
