Jump to content

Recommended Posts

In DS yuo can listen for the events pushed when the phase changes.

local myDayFunction = function()
	-- Do something when it becomes day
end

local myDuskFunction = function()
	-- Do something when it becomes dusk
end

local myNightFunction = function()
	-- Do something when it becomes night
end

inst:ListenForEvent( "daytime", myDayFunction, GetWorld())
inst:ListenForEvent( "dusktime", myDuskFunction, GetWorld())
inst:ListenForEvent( "nighttime", myNightFunction, GetWorld())

 

Edited by Ultroman

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...