Aquaterion Posted January 9, 2015 Share Posted January 9, 2015 (edited) Start server, enter LongUpdate(480*8) in the console. Also, I read the code, and there is no "new" moonphase, there is only full moon, so it won't work.What are you trying to do here? Fix Splumonkeys?Check this mod:http://steamcommunity.com/sharedfiles/filedetails/?id=364821573It has splumonkeys working. What I do for full moon nights is:local function NightCheck(inst) if TheWorld.state.isfullmoon then MyFunction(inst) endendinst:WatchWorldState("startnight", NightCheck) There is New, Quater, Half, ThreeQuater and FullMoon, there just isn't any of those except FullMoon for the "TheWorld.state.isMOONSTATE" And I had a few ideas and I thought splemonkey would be a good test subject. Now hopefully I have learnt enough lua from messing around with the monkey that I can achieve what I'm aiming for. The only problem I can think of atm is Art. Edited January 9, 2015 by Aquaterion Link to comment https://forums.kleientertainment.com/forums/topic/48764-scripting-get-moon-phase/page/2/#findComment-599418 Share on other sites More sharing options...
Kzisor Posted January 9, 2015 Share Posted January 9, 2015 @Aquaterion, alternatively since replacing self did not work you could do. local function OnMoonChanged(inst, phase)endTheWorld:ListenForEvent("onmoonchanged", function(src, phase) OnMoonChanged(inst, phase) end) This will listen for the event on TheWorld instance, but push the instance of the monkey to the function. Link to comment https://forums.kleientertainment.com/forums/topic/48764-scripting-get-moon-phase/page/2/#findComment-599424 Share on other sites More sharing options...
Aquaterion Posted January 9, 2015 Share Posted January 9, 2015 @Aquaterion, alternatively since replacing self did not work you could do. local function OnMoonChanged(inst, phase)endTheWorld:ListenForEvent("onmoonchanged", function(src, phase) OnMoonChanged(inst, phase) end) This will listen for the event on TheWorld instance, but push the instance of the monkey to the function. Well since I got it working I'm not gonna touch it for now, I spent too much time trying to fix something that I had already fixed but didn't realise, thanks though. Link to comment https://forums.kleientertainment.com/forums/topic/48764-scripting-get-moon-phase/page/2/#findComment-599429 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