Welcome to the Builder Academy

Question Advice on adding a trigger activating Sunrise/Sunset in addition to Time of Day?

More
04 Dec 2017 03:56 #7184 by krell
Hi folks,

I'm hoping to get some pointers on adding a script feature that acts on Sunrise/Sunset events rather than just Time of Day. I know this sounds a little odd but I had, not too far back, worked out a routine I called axial_tilt() which changed the respective daytime and night time hours incrementally throughout the MUD year. However, some of my scripts were tied to certain times of the day in order to activate them. This continued to work out well for some of the scripts, but others just seemed odd, like lights that would turn on or off hours after sunset or sunrise.

So, I'm not looking for someone to write some code for me, but just to point me in the right direction so that I can successfully achieve my intended goal. Thanks in advance.

Please Log in or Create an account to join the conversation.

More
04 Dec 2017 21:40 #7201 by thomas
Personally, I'd probably just copy the time_xtriggers() and make them accept a string arg. Then call this from the function where you are displaying the sunsets/rises.

Please Log in or Create an account to join the conversation.

More
15 Apr 2018 14:06 - 15 Apr 2018 14:12 #7922 by krell
Thanks thomas, I'll try that. Sorry for the delayed response.

So that's time_xtriggers() or check_time_triggers()? I can't find time_xtriggers().

Edit: Nevermind. I just realized you meant the x in time_xtriggers() as a place holder.
Last edit: 15 Apr 2018 14:12 by krell.

Please Log in or Create an account to join the conversation.

Time to create page: 0.240 seconds