# Rama's LevelScriptActor tutorial - OnRemoveFromWorld() "override"?

**URL:** <https://forums.unrealengine.com/t/ramas-levelscriptactor-tutorial-onremovefromworld-override/292242>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 28, 2014, 8:19am UTC](https://forums.unrealengine.com/t/ramas-levelscriptactor-tutorial-onremovefromworld-override/292242 "2014-08-28T08:19:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![robbiecooper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robbiecooper](https://forums.unrealengine.com/u/robbiecooper)\
**Post date:** [August 28, 2014, 8:19am UTC](https://forums.unrealengine.com/t/ramas-levelscriptactor-tutorial-onremovefromworld-override/292242/1 "2014-08-28T08:19:17Z")

</div>

Hi All

Anyone who has done Rama’s levelscriptactor tutorial- do you know why it says “OnRemoveFromWorld override”? LevelScriptActor has no such member to override. But it says to use instead of begin destroy, when RemoveFromWorld is being called on the level. I’m confused! Anyway, the code, as it is in the tutorial, doesn’t compile…

Thanks!

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [August 28, 2014, 6:49pm UTC](https://forums.unrealengine.com/t/ramas-levelscriptactor-tutorial-onremovefromworld-override/292242/2 "2014-08-28T18:49:23Z")

</div>

#Solution

Sorry that was for 4.2-ish, they changed it in 4.3, forgot to update the wiki 🙂

```
//ON REMOVE FROM WORLD - USE INSTEAD OF BEGIN DESTROY
/** Called when this actor is in a level which is being removed from the world (e.g. my level is getting UWorld::RemoveFromWorld called on it) */
/*
virtual void OnRemoveFromWorld() override;
*/
//THIS GOT REPLACED BY

virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;

```

#Wiki Updated

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

#:)

Rama

---

<div class="post-metadata">

**Author:** ![robbiecooper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@robbiecooper](https://forums.unrealengine.com/u/robbiecooper)\
**Post date:** [August 28, 2014, 7:33pm UTC](https://forums.unrealengine.com/t/ramas-levelscriptactor-tutorial-onremovefromworld-override/292242/3 "2014-08-28T19:33:08Z")

</div>

Great, thanks Rama!
