[CF 1545] Notification: While/On Condition Set Passing: Timer - Not working
tmw-issue-import opened this issue ยท 2 comments
I cannot get Notifications based on timers to work at all.
The timer exists and is being successfully shown in other icons. The notification is not being blocked by higher notifications.
The Icon that creates the timer:
^1^T^SCLEUEvents^T ^SSPELL_CAST_SUCCESS^B ^t^SType^Scleu ^SCLEUDur^N12 ^SName^SCall~`Dreadstalkers ^SSourceUnit^Splayer ^SEvents^T ^N1^T ^STimerOperation^Srestart ^SType^STimer ^SCounter^Scalldread ^SEvent^SOnShow ^t^N2^T ^STimerOperation^Sstop ^SType^STimer ^SCounter^Scalldread ^SEvent^SOnHide ^t^Sn^N2 ^t^SGUID^STMW:icon:1RSCZoOlrjsK ^SSettingsPerView^T ^Sicon^T ^STexts^T ^N1^S[Timer("calldread"):TMWFormatDuration] ^t^t^t^SStates^T ^N1^T ^t^N3^T ^t^N4^T ^t^t^SEnabled^B ^t^N85204^S~`~| ^Sicon^^
The Icon that tracks the timer, but cannot activate notifications based on the timer:
^1^T^SType^Scooldown ^SName^SSummon~`Demonic~`Tyrant ^SEnabled^B ^SEvents^T ^N1^T ^SType^SAnimations ^SDuration^N1 ^SAnimation^SACTVTNGLOW ^SEvent^SOnCondition ^SOnConditionConditions^T ^N1^T ^SType^STIMER ^SLevel^N9 ^SName^Scalldread ^t^Sn^N1 ^t^t^Sn^N1 ^t^SSettingsPerView^T ^Sicon^T ^STexts^T ^N1^S[Timer("calldread"):TMWFormatDuration] ^t^t^t^SStates^T ^N1^T ^t^N3^T ^SColor^Sff7f0000 ^t^N4^T ^t^t^SRangeCheck^B ^t^N85204^S~`~| ^Sicon^^
Posted by CurseForge user urza1234 | Imported from CurseForge issue #1545 | Raw
It is unfathomably likely that the timer will ever have exactly 9 seconds remaining (e.g. it will probably have 9.014566666667 remaining, or some other value like that). Checking equality to a specific value should be used exclusively for checking 0 seconds, as its the only integer value where you can expect the timer to ever have that exact value.
You should check greater than or equal to 9 seconds instead.
Edited Aug 12, 2018
Posted by CurseForge user Cybeloras
Yeah, I'll swear I tried >= before, but it worked this time. Clearly user error, I retract issue.
Posted by CurseForge user urza1234