I'm trying to set up a bunch of triggers that grant another charge of certain spells a certain time after they were cast, but I'm running into a problem where the triggers just loop indefinitely.
What I'm doing right now is this (this example uses Bolt):
But it seems to infinitely loop after being triggered.
After a little bit of bafflement, I wrote this trigger effect:
Which shows that the trGetGPUsedTime function just seems to return the time that the player first used the god power, rather than the time they last used it. As such, God Power Used is a pretty useless function for my purpose, as it will always return true if you've used the power even once.
Is there some sort of work around or other method of triggering a trigger on using a god power that would be closer to what I want, or is my idea an impossibility?
(P.S. I know I could just modify the data files for god powers, but I'd prefer to do it through triggers unless absolutely necessary)
What I'm doing right now is this (this example uses Bolt):
Trigger 1
Conditions:
God Power Used(Bolt)
Effects:
Fire Event(Trigger 2)
Trigger 2
Conditions:
Timer(30s)
Effects:
Grant God Power(Bolt)
Fire Event(Trigger 1)
But it seems to infinitely loop after being triggered.
After a little bit of bafflement, I wrote this trigger effect:
<Effect name="Quest Var Set GPUsed time">
<Param name="QVName" dispName="Var Name" VarType="string"> QV1< /Param>
<Param name="PowerName" dispName="Power" VarType="godpower"> default< /Param>
<Param name="Player" dispName="Player" varType="player"> 1< /Param>
<Command> trQuestVarSet("%QVName%", trGetGPUsedTime("%PowerName%", %Player%));< /Command>
</Effect>
Which shows that the trGetGPUsedTime function just seems to return the time that the player first used the god power, rather than the time they last used it. As such, God Power Used is a pretty useless function for my purpose, as it will always return true if you've used the power even once.
Is there some sort of work around or other method of triggering a trigger on using a god power that would be closer to what I want, or is my idea an impossibility?
(P.S. I know I could just modify the data files for god powers, but I'd prefer to do it through triggers unless absolutely necessary)