Nyogtha Posted November 28, 2015 Share Posted November 28, 2015 (edited) 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") endendAnd 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 November 28, 2015 by Nyogtha Link to comment https://forums.kleientertainment.com/forums/topic/59516-broken-code-seasonal-appearance-change-not-functioning/ Share on other sites More sharing options...
Arkathorn Posted November 28, 2015 Share Posted November 28, 2015 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 https://forums.kleientertainment.com/forums/topic/59516-broken-code-seasonal-appearance-change-not-functioning/#findComment-689283 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now