How to make universal turns scripts?

I just want to know how to make turn scripts affect every room and object.


If you put a turnscript in a room, it will only work while the player is inside that room. If turnscripts aren't inside an object, it will run whenever it is enabled.

You can create them at the bottom of the game's "Scripts" tab.


Well, considering I asked how I can sort commands in my last question, how can I do the same for these turn scripts?

Also, thanks for the previous response.


You could sort turnscripts in the editor by putting them into rooms, and have a script that runs at the start of the game to move them outside the room. For example, if you organised them all into rooms under a room called turnscripts_container, your script could be:

foreach (ts, AllTurnScripts()) {
  if (Contains (turnscripts_container, ts)) {
    ts.parent = null
  }
}
destroy ("turnscripts_container")

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums