#(JustinS) .has_flag[*_flag]?
49 messages · Page 1 of 1 (latest)
(JustinS) .has_flag[*_flag]?
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
should use subflags for this
I know. I made the system a while ago and don't feel like risking breaking everything over a small additional feature
Is there another way?
I could loop through the list of flags and check if the block has that flag
but I run this everytime a block breaks
is there a switch for this?
dont see it in the docs.. I see flagged but thats for players afaik
on the break blocks are you checking if the player is flagged vs the location.
I want to check the location
Im not checking anything in the event atm
on the break blocks you could check location_flagged
I said why I don't want to do that. I know it would be better, but I'm not asking that
You can also have a list of existing flag names and loop through them
Thought of that but I'd have to do that on every block breaks
.
is that not a bit bad for performance
or is it finee
its a short list
it's fine
still should think about switching to subflags
could have a second system that will update your thing when the block breaks
Cant I do location_flagged:flag1|flag2|flag3...?
in the on event
just thought of that
!tias
Try it and see!
If somebody pulled this up for you, you're probably asking a question of the public channel that's easier and faster to figure out by just attempting your idea in-game and looking at the result of that attempt.
location_flagged doesnt work with multiple flags ig
didnt work\
it does work with a single flag
thats stupid
if each flag on a block has different logic could add multiple and run the specific logic in each one.
nope
I need to remove the flags
if they have the flags
So basically, when a player breaks a block, and it has a flag ending with _block, remove that flag
I see
you could try this
on player breaks block location_flagged:test location_flagged:worst_flag:
Is that even valid?
!itworks
Many newer scripters tend to not realize the important difference between "it works" and "it is correct". Just because a script works does not mean everything's fine.
Helpers are encouraged to refuse to continue helping a user with the "if it works it's good enough" mindset until they fix all the things that are wrong (but seem to work) in their script.
Read a longer writeup explaining this idea on the forum here: https://forum.denizenscript.com/threads/public-information-writeup-the-it-works-fallacy.265/