arx-insanity / ArxLibertatis

Cross-platform port of Arx Fatalis, a first-person role-playing game
https://arx-libertatis.org/
GNU General Public License v3.0
3 stars 0 forks source link

add date and month as global script variables so that season based events can be added to the game #13

Closed meszaros-lajos-gyorgy closed 1 year ago

meszaros-lajos-gyorgy commented 2 years ago

Idea: replace apples with pumpkins and apple pies with pumpkin pies on halloween:

// apple 

ON INIT {
  // ...
  IF (^#realtime_month == 10) {
    IF (^#realtime_day == 31) {
      // replace texture, name and size to resamble a pumpkin
    }
  }
}
meszaros-lajos-gyorgy commented 2 years ago

Other system variables can be found here: https://wiki.arx-libertatis.org/Script:Variables#System_variables

meszaros-lajos-gyorgy commented 1 year ago

source of the solution: https://stackoverflow.com/a/15958113/1806628