Jump to content

How do I listen for "clocksegschanged" event?

Recommended Posts

I'd like to run some code every time the clock hits a new segment

In clock.lua I found the event "clocksegschanged"

local _world = TheWorld

function self:OnUpdate(dt)
	_world:PushEvent("clocksegschanged", data)

but I don't seem to be able to listen for it. This code never runs:

function OnClockSegsChanged(inst)

	inst:ListenForEvent("clocksegschanged", OnClockSegsChanged)

Am I doing something wrong, or is this event unavailable to mods?


Link to comment
Share on other sites

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