So i am trying to create a counter that would count how many interesting items he has found during that session. I also didn’t want to make it so that i would have to manually input the number of items and used a counter in a form of another command.
so the commands that i’ve used so far have been:
!commands add !candycounter Less Has found 0 pieces of candy so far
and
!commands add !ca -ul=mod -a=!commands edit !candycounter Less Has found $(count) pieces of candy so far
so the problem is that i cant seem to find a way to reset the counter in the !ca command. If i just straight up edit the !candycounter
command to say 0, the next time i use !ca
it will remember the earlier value and just add more to that. And if i use !candycounter
again after using !ca
it will just show the old value with 1 added to it.
\-c=0
doesn’t really seem to do anything or i am misusing it.
Thanks
EDIT:
Ok so this is how i got it to work:
I’ll use !deaths as a place holder, you can change it to what you want (in example !itemsfound)
So create a command for checking the time something happened usable by everyone.
!commands add !deaths This streamer has died 0 times this far
then create a command only usable by mods that adds to that counter:
!commands add !deathsadd -ul=mod -a=!commands edit !deaths This streamer has died $(count) times this far
so now using !deathsadd will add a death to the counter
So now well have to create something to reset both of the commands:
To reset the counter in !deathsadd
well do this (note that i made it only usable by mods):
!commands add !deathsaddreset -ul=mod -a=!commands edit !deathsadd -c=0
And we also have to create a command (only usable by mods) that resets !deaths
to its original state of 0:
!commands add !deathsreset -ul=mod -a=!commands edit !deaths This streamer has died 0 times this far
DO NOTE THAT YOU WILL HAVE TO RUN BOTH
!deathsreset
AND!deathsaddreset
FOR IT TO WORK
Also if you want to change it to count something else you’ll have to know what to change in the commands, i will probably not be helping with that since this is just an example that i’ve made (with the help of Xgerhard) to represent a way to do it. You should still ask, maybe someone will help you with that.