I created the following in my mod file:
Variable (unit) - Summoner
Trigger - When a unit casts a specific summoning ability, set the caster to "Summoner"
Trigger - When a unit is created by that specific summoning ability, wait .0625 seconds, then grab the stack count of Summoner's attribute and apply a buff to the created unit
The mod is loaded as a dependency on my map, but the trigger does not work. I added debug messages to both triggers, neither appear. So I duplicated both triggers into the map itself, and altered the debug messages. Running the map in this state gives me 4 debug messages, and applies all 4 triggers (applying the buff twice).
I selected both triggers and unchecked "enabled" and "initially on." They're shown now, faded out, with a red X over the symbol. I run the map, and the trigger in the mod fires, giving me the debug message and applying the buff properly. I remove the two disabled triggers (which shouldn't be doing anything, right?) and suddenly, the mod trigger is no longer firing. The buff is no longer being applied, and I'm no longer getting debug messages.
Does a disabled trigger even have any effects? I've messed around with it quite a bit trying to get it to do what I want, but I honestly don't understand why it would behave differently when the 2 triggers are disabled, versus when they are simply removed...
Also, oddly enough, it works when even one of those triggers remain (disabled). I can delete one or the other, and leave the remaining one disabled, and the mod triggers still function. But once I delete both, the mod triggers don't work anymore...
I guess you need to let the map know the mod exists, so you would need to call any trigger element of your mod from the map first (like setting your summoner variable to no unit at map initialization).
Maybe if you have those triggers in your map the game initializes the mod trigger stuff even if its not needed afterwards since those triggers are disabled, but if they don't exist there also is no need for the game to take any look at your mods content.
I guess you need to let the map know the mod exists, so you would need to call any trigger element of your mod from the map first (like setting your summoner variable to no unit at map initialization). Maybe if you have those triggers in your map the game initializes the mod trigger stuff even if its not needed afterwards since those triggers are disabled, but if they don't exist there also is no need for the game to take any look at your mods content.
Interesting. I'll try that. If a disabled trigger still activates the variable somehow that would explain this mess.
I created the following in my mod file: Variable (unit) - Summoner Trigger - When a unit casts a specific summoning ability, set the caster to "Summoner" Trigger - When a unit is created by that specific summoning ability, wait .0625 seconds, then grab the stack count of Summoner's attribute and apply a buff to the created unit
The mod is loaded as a dependency on my map, but the trigger does not work. I added debug messages to both triggers, neither appear. So I duplicated both triggers into the map itself, and altered the debug messages. Running the map in this state gives me 4 debug messages, and applies all 4 triggers (applying the buff twice).
I selected both triggers and unchecked "enabled" and "initially on." They're shown now, faded out, with a red X over the symbol. I run the map, and the trigger in the mod fires, giving me the debug message and applying the buff properly. I remove the two disabled triggers (which shouldn't be doing anything, right?) and suddenly, the mod trigger is no longer firing. The buff is no longer being applied, and I'm no longer getting debug messages.
Anyone know what's going on here?
@Soma2035: Go
Does a disabled trigger even have any effects? I've messed around with it quite a bit trying to get it to do what I want, but I honestly don't understand why it would behave differently when the 2 triggers are disabled, versus when they are simply removed...
Also, oddly enough, it works when even one of those triggers remain (disabled). I can delete one or the other, and leave the remaining one disabled, and the mod triggers still function. But once I delete both, the mod triggers don't work anymore...
I guess you need to let the map know the mod exists, so you would need to call any trigger element of your mod from the map first (like setting your summoner variable to no unit at map initialization). Maybe if you have those triggers in your map the game initializes the mod trigger stuff even if its not needed afterwards since those triggers are disabled, but if they don't exist there also is no need for the game to take any look at your mods content.
Interesting. I'll try that. If a disabled trigger still activates the variable somehow that would explain this mess.
EDIT: It worked. That's quite an oddity. o.O