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

  • Krell
  • Krell's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 5 months ago #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
3 years 5 months ago #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.

  • Krell
  • Krell's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 4 weeks ago - 3 years 4 weeks ago #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: 3 years 4 weeks ago by Krell.

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

Time to create page: 0.072 seconds