Open ZaViper opened 4 days ago
Hello, the event is just to determine the time at which the conditions for all situations get checked. You have to write a condition that returns true whenever your situation should be active. Think of a situation as a state not as an event. From the top of my head, I do not know how to achieve what you have in mind.
Thank you for pointing me in the right direction! I ended up using ChatGPT to help write some custom code that worked perfectly for the conditions I needed. I thought I’d share them here in case anyone else finds this post and wants to create their own, or if you’d like to consider adding these as default profiles.
1.) For when you’re in a group:
return UnitInParty("player") or UnitInRaid("player")
2.) When targeting a hostile NPC:
return UnitIsEnemy("player", "target") and not UnitIsDead("target") and UnitCanAttack("player", "target")
3.) For World Quests (when you’re in an area with an active World Quest):
return C_QuestLog.GetNumQuestLogEntries() > 0 and (function()
for i = 1, C_QuestLog.GetNumQuestLogEntries() do
local questInfo = C_QuestLog.GetInfo(i)
if questInfo and QuestUtils_IsQuestWorldQuest(questInfo.questID) and C_QuestLog.IsOnQuest(questInfo.questID) then
return true
end
end
return false
end)()
To give some context for how I use these:
I hope this helps anyone else with similar needs!
Hello! Will it be possible to create three additional situations?
I have attempted to create custom situations for theses using these events:
But the situations don't get triggered. Am I doing something wrong, or does situations like these needs to be added to the addon?