Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - bupaje

Pages: [1]
1
Won't implement / Scheduler
« on: December 09, 2007, 06:55:58 PM »
I just finished the scene tutorial yesterday so probably premature for me to suggest anything, but hopefully you'll forgive it if its dumb ...

One feature I liked, from a non-adventure game called Tropico, for scripting events was its events scheduler. The system kept track of years, months and days and you could simply add events to any one of the lists (monthly events, weekly events, yearly events) and they'd run. It was something like

CheckFrequencyYearBegin
CheckFrequencyYearEnd
CheckFrequencyMonthBegin
CheckFrequencyMonthEnd
CheckFrequencyWeekBegin
CheckFrequencyWeekEnd
CheckFrequencyDayBegin
CheckFrequencyDayEnd

So you could simply add stuff like this (pseudocode)

CheckFrequencyDayBegin
  Call NightToDay
  Call TurnOnStreetLights

CheckFrequencyDayEnd
  Call DayToNight
  Call TurnOffStreetLights
  Entity1.ChangeColor

CheckFrequencyWeekEnd
  Call AddGold

CheckFrequencyMonthBegin
  If Month > 9 < 12 && PlayerIsOutside
    Call RandomWinterStorms
  Else NormalWeather


CheckFrequencyYearBegin
  If Year 2 Then Call TeleportToHiddenRoom

Hope this makes sense.

Pages: [1]

Page created in 0.019 seconds with 19 queries.