Jump to content

Recommended Posts

I have a barebones template, and then :

 

local function WatchPhase(inst, phase)    if phase == "summer" then		inst.AnimState:SetBuild("speksum")	end    if phase == "winter" then		inst.AnimState:SetBuild("spekwin")	end    if phase == "spring" then		inst.AnimState:SetBuild("spekspr")	end    if phase == "autumn" then		inst.AnimState:SetBuild("spek")	endend

And followed by :

local function master_postinit(inst)	inst:ListenForEvent("phase",WatchPhase,TheWorld)

Simply put, character appearance should change with season, it's not.

 

 

edit : oops this is supposed to be DST. Can't find where to Delete it...

Edited by Nyogtha

I'm pretty sure only moderators can delete posts.

I'm not sure about DST, but in Don't Starve the event is called by this code in 'components/seasonmanager.lua':

self.inst:PushEvent( "seasonChange", {season = self.current_season} )

The relevant code in DST would probably then be:

TheWorld:ListenForEvent("seasonChange", function(global, data)	WatchPhase(ThePlayer, data.season)end)

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