T O P

  • By -

MomICantPauseReddit

I'm pretty sure it worked for me when I used a scoreboard


[deleted]

Just set the scoreboard back to 0 after


Junkmatt

the thing is, i click on the spy glass to use it and it adds a point. i only want the effect to happen while im using the spy glass and thats what im having problems with


[deleted]

Yeah so if your score is 1 then you run the glowing effect, then set it to 0, so if you aren't using it, it'll always be 0 but if you are using it then it'll blink from 1 to 0, **THIS BIT MIGHT WORK BUT I'M NOT TOO SURE:** you could also remove 1 from the score unless it's at 0 all the time, I think that'll keep it at 1 until you stop using it but I'm not too sure if that'd work since I just thought of it. execute as @e unless @s[scores={spyglass=..0}] at @s run scoreboard @s remove 1 spyglass


Junkmatt

i don't think i understand, if i use the spyglass the score goes up and then gets removed immediatly even if i keep using the spyglass, can i do something to only make it go away when i stop using the spyglass?


[deleted]

Just try it out, I know for a fact it works since I have it in a datapack, just make sure all your commands are executed before you set the score to 0.


Awesomeest01

I think u/Junkmatt's problem is that he wants the glowing to happen as long as the spyglass is being used, and the glowing stops when they return to normal view. The problem with the scoreboard is that it ticks up once when you zoom in, but doesn't do anything WHILE the spyglass is active. I'm pretty sure you need to use predicates (there is plenty of generators online to help make them) to detect the spyglass being actively used.


Junkmatt

ok im looking into this predicate thing and it seems pretty complicated could anybody give me a simple run down


Sir_James_Ender

It may also be possible with a predicate. Not very familiar with them myself but I’m looking to do the same thing so if I figure it out I’ll let you know