Oni (folder)/GameDataFolder/IGMD/global: Difference between revisions

m
OSL to BSL
m (OSL to BSL)
Line 1: Line 1:
==Oni global script folder==
==Oni global script folder==
"global" is a "secret subfolder" of [[OSL:IGMD|IGMD]] : a regular installation of Oni doesn't have it at all.
"global" is a "secret subfolder" of [[IGMD|IGMD]] : a regular installation of Oni doesn't have it at all.


But you can create it and use it and it's actually very rewarding. It's a very special folder.
But you can create it and use it and it's actually very rewarding. It's a very special folder.
Line 11: Line 11:
Is there really a short way to describe it? Oh well...
Is there really a short way to describe it? Oh well...
-----------
-----------
Let's say you want Oni to do the exact same thing every time you load a save point. Like, you've just learned about how the [[OSL:Oni Scripting Language/functions/built-in/dmsg|<tt>dmsg</tt>]] command works, and you want the message "Thank you for playing Oni!" to be displayed after a level loads. Then the trivial solution is to go in every level's folder, open the file where <tt>func void main(void)</tt> is declared and modify it as follows :
Let's say you want Oni to do the exact same thing every time you load a save point. Like, you've just learned about how the [[BSL:Functions#message|dmsg]] command works, and you want the message "Thank you for playing Oni!" to be displayed after a level loads. Then the trivial solution is to go in every level's folder, open the file where <tt>func void main(void)</tt> is declared and modify it as follows :
  func void main(void) {
  func void main(void) {
     dmsg "Thank you for playing Oni!"
     dmsg "Thank you for playing Oni!"
1,051

edits