Jump to content

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

m
Line 35: Line 35:


===Why call it <tt>pre</tt>?===
===Why call it <tt>pre</tt>?===
Because everything in <tt>func main</tt> is level-specific settings and/or logic, so if you want something to happen exactly the same way every time you load a level, the only place to add that something is at the very start of <tt>func main</tt>, that is, ''before'' all the level-specific content. Which is why it's called "pre".
Because everything in <tt>func main</tt> is level-specific settings and/or logic, so if you want something to happen exactly the same way every time you load a level, the only place to add that something is at the very start of <tt>func main</tt>, that is, ''before'' all the level-specific content. Which is why I've been calling it <tt>pre</tt>. Oh, you can name it <tt>shpadoinkle</tt> if you like... but that choice is a bit harder to justify. [[User:Geyser|geyser]]
 
*Let's build a snowman, we can make him our best friend, we could name him Bob... or we could name him ''Beowulf''! We could make him tall, or we could make him ''not so tall''... Snowman!
Should still work if you name it anything else though. <tt>pre</tt> just makes the most sense.


===Why make it inline? (WARNING : EXPERT STUFF)===
===Why make it inline? (WARNING : EXPERT STUFF)===