Replies: 2 comments
-
This isnt a bug - this is a question because of a misunderstanding about how variables work. Moving it. |
Beta Was this translation helpful? Give feedback.
-
From the documentation (https://github.com/TimothyLuke/GSE-Advanced-Macro-Compiler/wiki/Useful-Variables):
Variables are never evaluated inside combat. Once the Sequence is compiled into a macro they are simply not checked again. The result of "Compile Template" is how your sequence is going to execute. There is no point writing a variable to check the state of a spell cooldown as it will be either true or false at the time the Sequence is compiled and has no understanding of what has happened in combat. The other thing that is causing your issues is you need to change the Variable name before you save it. IF your variable is still called the randomly generated placeholder of NewVarXX its going to throw errors. |
Beta Was this translation helpful? Give feedback.
-
🔵 Describe the bug:
I created a custom variable in GSE that checks if my spell is on cooldown. The variable is designed to return true if the spell is on cooldown and false if it is not. The functionality works as expected when I use the /dump command to test it—true is returned when the spell is on cooldown, and false when it is not.
However, when I add this variable into a Boolean (bool) action bar condition within GSE, it incorrectly returns true all the time, regardless of whether the spell is actually on cooldown or not.
🔵 To reproduce: (Steps to reproduce the behavior)
I created a custom variable in GSE using the following Lua code:
This variable is intended to check the spell's cooldown with ID 232893. It returns true if the spell is not on cooldown (duration == 0) and false otherwise. After saving the variable, GSE indicates that it was successfully saved.
However, when I click on the variable name in the variable list, an error message appears:
🔵 The error:
Paste the error message in this blockquote.
🔵 Screenshots:
PS: P.S.: It's weird because after I created the variable for the first time and used a sequence to call the variable to return "yes" or "no," it worked perfectly. However, once I started assigning the spells to the action bar, the variable would always return true and never return false. This issue occurs only when the variable is linked to the action bar, as it functions correctly in other contexts.
🔵 Expected behavior:
After creating my variable that checks if a spell is on cooldown, I expect the following behavior when using it in my action bar:
Variable Check: The variable should check Spell One's cooldown status.
If Spell One is on cooldown, the variable should return false.
If Spell One is not on cooldown, the variable should return true.
Action Bar Logic:
When the Variable Returns true: The action bar should cast Spell One.
When the Variable Returns false: The action bar should cast another spell, such as Spell Two.
🔵 GSE.lua file:
🔵 Desktop (please complete the following information):
OS: Windows 10 64bit
Game Version: retail (11.0.2.56313)
🔵 GSE Version:
Version: [3.2.12]
Downloaded From: [e.g. https://www.curseforge.com]
🔵 Additional context:
None
Beta Was this translation helpful? Give feedback.
All reactions