Time of Day Events: Lights and Sound

Scripts and code that enhance the gameplay functionality of the engine.
2 posts Page 1 of 1
Jason Campbell
Posts: 332
Joined: Fri Feb 13, 2015 2:51 am
by Jason Campbell » Fri Apr 13, 2018 2:09 pm
Time Events: Lights and Sound

Original Dynamic Light Code by John Ford
Sounds are CC0

Adds the ability to have lights in the level that turn on at night.
Also demonstrates one way to have other things occur. I've included ambient sound that changes from day to night.
Shows how relatively simple using a timed events are.

Download timeEvent.zip
https://drive.google.com/open?id=1T8xUV ... 5OihBxFzGN
Follow my crappy included instructions.

Edit: Forgot to add to instructions. For the sound to start initially you need to call the function. I just put it in game.cs when the mission is loaded.

Add :
startDaySounds ();

If your mission starts at night add:
startNightSounds ();


Make sure that you have a scene set-up in a similar manner. AmbientSound, DynamicLights and MissionLights match the included code.
sceneTree_nestedLights.jpg (25.52 KiB) Viewed 1695 times
Posts: 330
Joined: Tue Feb 03, 2015 10:30 pm
by Steve_Yorkshire » Mon Apr 16, 2018 10:32 pm
Noice :)
2 posts Page 1 of 1

Who is online

Users browsing this forum: Bloodknight and 1 guest