Left 4 Sharkb8 Posted December 18, 2021 Share Posted December 18, 2021 I'd like to make my character be in their monster form until the next day begins, but they turn into their monster form by hitting 0 sanity. I currently have the latter half of that function done, but I can't figure out the daytime part. I've attached the code that's relevant to my situation below, thanks in advance! garfield.lua Link to comment Share on other sites More sharing options...
skittles sour Posted December 20, 2021 Share Posted December 20, 2021 If you're modding for DS, you'll be listening for the "day" event pushed by the world, and you'll be able to check the names of the events in the clock component file; if you're modding for DST, you'll be using the watch world state function, and you can check the worldstate file in the components folder. An example is the pumpkin_lantern prefab: local function OnIsDay(inst, isday, delayed) --... end -- ... inst:WatchWorldState("isday", OnIsDay) 1 Link to comment 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