| 11-23-2006, 03:47 AM | #1 |
I have a series of triggers that need to call each other, to sum it up it's like this: 1. Trigger A sets VariableTrigger = Trigger C 2. Trigger A calls trigger B 3. Trigger B calls trigger VariableTrigger then sets VariableTrigger = TriggerX Then later: 4. Trigger A2 calls trigger B 5. Trigger B calls trigger VariableTrigger then sets VariableTrigger = TriggerX You would think that after step 3 Trigger C would run, and when Trigger A2 happens it would result in TriggerX firing. (TriggerX is a sort of default trigger, I don't actually need it but I have used it to debug what is going on). What actually happens is that nothing happens after step 3. Then Trigger C final runs after step 5. If A2 were to be run a second time then TriggerX finally runs. So it looks like VariableTrigger is lagging behind each time it is called, but I don't even know how that is possible. |
| 11-26-2006, 09:05 PM | #2 |
So nobody has any idea why this would happen? |
| 11-27-2006, 03:29 PM | #3 |
I don't think anyone can make sense of what you ask without showing us your triggers/system. |
| 11-28-2006, 09:21 PM | #4 |
Its a lot simpler to say it how I did. But maybe later I will post the trigger. I got a workaround for this anyway. Instead of setting a trigger variable I just told it to wait in the first trigger for a bit and then call the third trigger checking the condition that the second trigger completed. But it bugs me that it doesn't work the first way I tried, when it should. If it helps to understand the purpose of these triggers, it is for my system for heroes to learn spells. They can choose from a variety of spells in a "spell school" (what they are really doing is buying an item). So for every item/ability I need a trigger to connect them. That is Trigger A. It just detects when an item is bought and sets an ability variable to equal the associated ability. Then it runs a universal "Learn" trigger (Trigger B) which runs all sorts of checks to see if the hero can learn that ability. If it passes the checks then it will add the ability and set some variables for record keeping and stuff. Then there might be some more special actions that need to be done depending on the ability learned. That is what trigger TriggerX is. It is so I can set the variable trigger in the first trigger that connects the item to the ability but doesn't run the trigger until after the checks in the universal trigger. The problem is it doesn't run the extra trigger until another ability is learned. Usually that means the extra trigger applies to the wrong hero. It is lagging behind for some reason. |
