Scripts to "appear/disappear" Objects.

Welcome to the OMSI-WebDisk!
As guest you can only see content in your selected language! Registered users can choose the visibility of other languages in their control panel, more informations here. All topics are marked with a language flag inside the forums: = English [EN], = German [DE], = French [FR].
If you're not able to speak the topic language than write in English!
  • Hi, my goal is to try to understand how the scripting system works for scenery objects, particularly, making objects appear and disappear based on the time of day. My goal is to have ai "car_park" objects appear and disappear based on the time of day.

    I found this code from one of the static "people_standing" objects and was wondering if someone could explain the different functions and variables used in the .osc file to make the appear/disappear variable work:

    I'd like to understand how to edit this code to my specification so that I don't need to ask this question every time! ;)

  • Advertisement
  • Hey!

    You could look into "Waldheinis Objekte" from the maps Ettbruck and Blankwitz.

    The benches in the beer garden appear at a certain time. This is regulated with just such a script.

    I do not have this at the moment, but I know that there is a query by time of day. A query of the day of the week is also possible.

  • Im going to Link an older Thread from the other Omsi-Forum on which I provided an example script, since the thread is in german you might have trouble to understand the complete discussion: *Klick*

    In the upper example the object becomes visible after 9am and disapears after 9pm

    Maybe this helps :)



  • I have edited the code now so that in the editor, the "car_park" object appears and disappears at the right time using the "Environment" tab. However, when I go in game, the parked cars do not spawn/despawn when I change the time of day. Is this a limitation of the game?

    Edit: No Need! Found Solution!