Hello Mapster-users, I've came with problem that can strut my ass off.
I've wanted to create just a test map with custom triggers in it. I've map already done all via galaxy, but that's not the problem.
The problem is that when I create new triggers in map where's all written in galaxy, it's okay. But if I create new map, trigger just won't be recognized.
And as Initializer there's TestInit, but when i start map, it says that trigger Test is not found... In map with galaxy in it it works fine, but in new map there's that problem...
the only thing that came to me is that your trigger is named "Test" and you add a variable with the same name for the function. Try to rename your new function to TestActions or anything like that.
Try this with GUI, create a trigger with periodic count, and then do CTRL+F11, and find you trigger name, trigger will be identical but global variables.
That is because your trigger function hasn't been formatted correctly. Trigger functions need a certain signature to register correctly.
They always have to take 2 booleans as parameters and return a boolean:
By the way, everytime the trigger returns True the Trigger Debugger will count it as a successful execution. Everytime it returns false it'll ignore the fact that the trigger executed.
The two booleans are usually named testConds and runActions (or something like that). the parameters change depending on how you execute the trigger. E.g. if you Disable a trigger then the runActions boolean will be false, however the trigger will STILL be executed (I think). That's why all GUI-created trigger functions always have this in the beginning:
Hello Mapster-users, I've came with problem that can strut my ass off.
I've wanted to create just a test map with custom triggers in it. I've map already done all via galaxy, but that's not the problem. The problem is that when I create new triggers in map where's all written in galaxy, it's okay. But if I create new map, trigger just won't be recognized.
Just for test I've writed that trigger:
And as Initializer there's TestInit, but when i start map, it says that trigger Test is not found... In map with galaxy in it it works fine, but in new map there's that problem...
Thanks for response.
the only thing that came to me is that your trigger is named "Test" and you add a variable with the same name for the function. Try to rename your new function to TestActions or anything like that.
The thing is that
is pointing to
that trigger Test will do a job every 1 second...
Try this with GUI, create a trigger with periodic count, and then do CTRL+F11, and find you trigger name, trigger will be identical but global variables.
That is because your trigger function hasn't been formatted correctly. Trigger functions need a certain signature to register correctly.
They always have to take 2 booleans as parameters and return a boolean:
This should be working.
By the way, everytime the trigger returns True the Trigger Debugger will count it as a successful execution. Everytime it returns false it'll ignore the fact that the trigger executed.
The two booleans are usually named testConds and runActions (or something like that). the parameters change depending on how you execute the trigger. E.g. if you Disable a trigger then the runActions boolean will be false, however the trigger will STILL be executed (I think). That's why all GUI-created trigger functions always have this in the beginning:
Wait... I've created same trigger but without second boolean, forgot about it...
But really, I'm messed with syntax in this post :)
Thanks, that really helped me a lot :)
They might as well have split the trigger into a "launcher" trigger and a "logic" trigger. This is just bad code.