Jump to content

[Broken Code] Seasonal Appearance Change Not Functioning.


Nyogtha

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

Link to comment
Share on other sites

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)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...