# How can I set up a Time of Day system using code?

**URL:** <https://forums.unrealengine.com/t/how-can-i-set-up-a-time-of-day-system-using-code/283055>\
**Category:** Rendering\
**Tags:** unreal-engine, Lighting, CPP, question\
**Created:** [May 11, 2014, 9:41am UTC](https://forums.unrealengine.com/t/how-can-i-set-up-a-time-of-day-system-using-code/283055 "2014-05-11T09:41:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_b782b2f51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b782b2f51](https://forums.unrealengine.com/u/anonymous_user_b782b2f51)\
**Post date:** [May 11, 2014, 9:41am UTC](https://forums.unrealengine.com/t/how-can-i-set-up-a-time-of-day-system-using-code/283055/1 "2014-05-11T09:41:13Z")

</div>

Hi,

I already have a ToD system working in my Level Blueprint and would like to move it to C++.  
Now where do I have to place my code? So what is the C++ equivalent of the Level Blueprint?

(I’m relatively new to C++, UE4 and Game Developent in general)

Thanks in advance,

---

<div class="post-metadata">

**Author:** ![Dartanlla](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dartanlla/32/724052_2.png) [@Dartanlla](https://forums.unrealengine.com/u/Dartanlla)\
**Post date:** [May 12, 2014, 3:20am UTC](https://forums.unrealengine.com/t/how-can-i-set-up-a-time-of-day-system-using-code/283055/2 "2014-05-12T03:20:53Z")

</div>

I haven’t tried this yet in my game, but I am getting close to needing to do it. Here is the information I found. The class you are looking for is ALevelScriptActor. This is what the level blueprint inherits from. You can find more information and a tutorial on how to do this here:

> **[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...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b782b2f51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b782b2f51](https://forums.unrealengine.com/u/anonymous_user_b782b2f51)\
**Post date:** [May 12, 2014, 12:31pm UTC](https://forums.unrealengine.com/t/how-can-i-set-up-a-time-of-day-system-using-code/283055/3 "2014-05-12T12:31:31Z")

</div>

Thank you very much! 🙂
