This is in a new custom script, and is the only thing in the map. I have no idea the problem, as when I view script with this and compare it to the script of an empty map with a GUI trigger that does the same thing, there aren't any differences besides the names of all functions etc
There are no syntax errors, it just does not do anything ingame, and the debug window is empty
This function creates your trigger, but it will not be automatically called or so. So basically your script is correct, the trigger just won't get created.
The solution to that is easy - at the bottom of the custom script section you have a input line saying "Initializer Function". In there you can write the name of a trigger that will be executed at map initialization.
Just write "Hello_World_Init" in there (no need for brackets) and your trigger will be created just fine.
If you view the full map script (CRTL+F11) you'll see such a section:
Hi there, I am a big fan of writing out as much is possible in the galaxy editor, so I tried to write out all my triggers in custom script.
It does not seem to be working. This is the code I use for creating a new trigger in custom script
This is in a new custom script, and is the only thing in the map. I have no idea the problem, as when I view script with this and compare it to the script of an empty map with a GUI trigger that does the same thing, there aren't any differences besides the names of all functions etc
There are no syntax errors, it just does not do anything ingame, and the debug window is empty
GUI is a little bit misleading in this regard.
This function creates your trigger, but it will not be automatically called or so. So basically your script is correct, the trigger just won't get created.
The solution to that is easy - at the bottom of the custom script section you have a input line saying "Initializer Function". In there you can write the name of a trigger that will be executed at map initialization.
Just write "Hello_World_Init" in there (no need for brackets) and your trigger will be created just fine.
If you view the full map script (CRTL+F11) you'll see such a section:
In there all of these initializer functions will be called. So after you added your init function to the initializer it'll look like this:
PS: Hurray for people learning galaxy :D
@s3rius: Go
Ahhhh thank you thank you. Just tried it out and it and everything started to work. Its so small down the bottom :P
Also, congrats on mod :P