# Game flow when game ends

**URL:** <https://forums.unrealengine.com/t/game-flow-when-game-ends/400835>\
**Category:** Modding\
**Tags:** gamemode, unreal-engine, question\
**Created:** [July 29, 2017, 2:13am UTC](https://forums.unrealengine.com/t/game-flow-when-game-ends/400835 "2017-07-29T02:13:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_24cff47d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_24cff47d](https://forums.unrealengine.com/u/anonymous_user_24cff47d)\
**Post date:** [July 29, 2017, 2:13am UTC](https://forums.unrealengine.com/t/game-flow-when-game-ends/400835/1 "2017-07-29T02:13:27Z")

</div>

There is a great figure that shows sequence of events when game starts: [Gameplay Framework in Unreal engine | Unreal Engine 5.2 Documentation](https://docs.unrealengine.com/latest/INT/Gameplay/Framework/GameFlow/index.html)

I’m wondering what is the sequence of events when game end? Specifically I’m looking for opposite of `AGameMode:StartPlay` that I can everride to do some clean up when game ends (either via Editor end button or standalone mode).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_24cff47d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_24cff47d](https://forums.unrealengine.com/u/anonymous_user_24cff47d)\
**Post date:** [August 8, 2017, 6:26am UTC](https://forums.unrealengine.com/t/game-flow-when-game-ends/400835/2 "2017-08-08T06:26:03Z")

</div>

Here’s another chart for actor spawn/destroy and some of EndPlay event sequence: [Unreal Engine Actor Lifecycle | Unreal Engine 5.2 Documentation](https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Actors/ActorLifecycle/index.html)

---

<div class="post-metadata">

**Author:** ![plojnitza](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@plojnitza](https://forums.unrealengine.com/u/plojnitza)\
**Post date:** [August 8, 2017, 6:34am UTC](https://forums.unrealengine.com/t/game-flow-when-game-ends/400835/3 "2017-08-08T06:34:58Z")

</div>

EndPlay()
