Thanks a ton guys! Was gonna give up on .galaxy because i thought events were disabled.
Last question, how do i use the code syntax on this website? Eg: The color syntax that people use when they post galaxy code.
I just started coding in galaxy, and decided to view script of a basic gui trigger (Map init event, display message TEST1).
However, I don't know which part of the code actually executes the event.
bool gt_MeleeInitialization_Func (bool testConds, bool runActions) {
// Actions
if (!runActions) {
return true;
}
UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/D5973442"));
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_MeleeInitialization_Init () {
gt_MeleeInitialization = TriggerCreate("gt_MeleeInitialization_Func");
TriggerAddEventMapInit(gt_MeleeInitialization);
}
Pasting that into a custom script page gives me a syntax error for the below part of the trigger.
//--------------------------------------------------------------------------------------------------
void gt_MeleeInitialization_Init () {
gt_MeleeInitialization = TriggerCreate("gt_MeleeInitialization_Func");
TriggerAddEventMapInit(gt_MeleeInitialization);
If i remove that, however, the script does not execute.
I know this is noobish, but i'm familiar with almost every other aspect of galaxy code other then getting the damn trigger to run.
Any help appreciated; thanks!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Nevermind, finally figured out that custom script can't have events.. great
bool gt_MeleeInitialization_Func (bool testConds, bool runActions) { // Actions if (!runActions) { return true; } UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/D5973442")); return true; } //-------------------------------------------------------------------------------------------------- void gt_MeleeInitialization_Init () { gt_MeleeInitialization = TriggerCreate("gt_MeleeInitialization_Func"); TriggerAddEventMapInit(gt_MeleeInitialization); }
Pasting that into a custom script page gives me a syntax error for the below part of the trigger.//-------------------------------------------------------------------------------------------------- void gt_MeleeInitialization_Init () { gt_MeleeInitialization = TriggerCreate("gt_MeleeInitialization_Func"); TriggerAddEventMapInit(gt_MeleeInitialization);
If i remove that, however, the script does not execute. I know this is noobish, but i'm familiar with almost every other aspect of galaxy code other then getting the damn trigger to run. Any help appreciated; thanks!