#(MrCrash) How to "transfer" a flag?

73 messages · Page 1 of 1 (latest)

unborn sedge
#

Like i want to transfert a flag to a specific locationtag to the locationtag.below[1] and clear the flag to the last locationtag

so i use:

            - if <[pipe_flag_bas].below[1].has_flag[ingepipe]>:
              - flag <[pipe_flag_bas].below[1]> items_pipe_bas:<[pipe_flag_bas].flag[items_pipe_bas]>
              - flag <[pipe_flag_bas]> items_pipe_bas:!```

in:

```on system time secondly every:10:
      - foreach <server.flag[inge_pipe]> as:pipe:
        - if <[pipe].above[1].has_flag[chest_pipe_input]>:
          - flag <[pipe]> items_pipe_bas:<[pipe].above[1].inventory.list_contents>
          - take item:<[pipe].above[1].inventory.list_contents> from:<[pipe].above[1].inventory>
        - if <[pipe].has_flag[items_pipe_bas]>:
          - foreach <[pipe].flag[items_pipe_bas]> as:pipe_flag_bas:
            - if <[pipe_flag_bas].below[1].has_flag[ingepipe]>:
              - flag <[pipe_flag_bas].below[1]> items_pipe_bas:<[pipe_flag_bas].flag[items_pipe_bas]>
              - flag <[pipe_flag_bas]> items_pipe_bas:!
              - playeffect effect:crit_magic at:<[pipe_flag_bas].below[1]> quantity:10 visibility:10 offset:0.5```
ocean cloudBOT
#

(MrCrash) How to "transfer" a flag?

ocean cloudBOT
#

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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

unborn sedge
#

to precise, i want the flagged_pipe (the flag value is the items to transfer) transfer this flag to the pipe below it every 10sec untill the block below isn't a pipe

alpine shale
#

ok? so is it not working..?

unborn sedge
#

nope, just the pipe below the chest (chest_pipe_input) receive the flag "items_pipe_bas" but he isn't transfered to the below[1] pipe

#

sound like i can only flag a server flag? that's weird?

alpine shale
#

ok.. sorry just wanted to check. did you actually take a look at your debug?

#

like the error is pretty extensive and descriptive

unborn sedge
#

need to use server flag

alpine shale
#

no

#

look at your debug

#

can you highlight here what the error is?
(ie take a screenshot or copy-paste the line where the error is at)

unborn sedge
#

Error Message: Cannot flag '[pipe_flag_bas].below[1].flag[ingepipe]': that does not appear to be an object! Only objects (like an EntityTag) and special keyword 'server' are flaggable!

alpine shale
#

ok.. you had to skip over several error lines to get to that one...

#

what is the first one?

unborn sedge
#

oh

#

missed this one

#

14:41:20 +- Queue 'PIPE_EVENT_27240_ScheduleNervous' Executing: (line 1100) foreach <[pipe_flag_bas].below[1].flag[ingepipe]> as:transfer_item_bas ---------+
14:41:20 ERROR in script 'pipe_event' in queue 'PIPE_EVENT_27240_ScheduleNervous' while executing command 'FOREACH' in file 'scripts/ingénieur.dsc' on line '1100'!
Error Message: Tag <[pipe_flag_bas].below[1].flag[ingepipe]> is invalid!

alpine shale
#

yes

unborn sedge
#

.flag[items_pipe_bas]> need to be a server flag to work in the foreach*

alpine shale
#

now.. go through the next few lines

#

it explains exactly why said tag is invalid

unborn sedge
#

okay i understand it now

#

let's fix it!

alpine shale
unborn sedge
#

i think this is invalid - if <[pipe_flag_bas].below[1].has_flag[ingepipe]>:

alpine shale
#

the tag in general is invalid.. yes.. but why?

#

(the debug explains why)

unborn sedge
#

because

#

The returned value from initial tag fragment '[pipe_flag_bas]' was: 'i@stripped_oak_log[quantity=64]'.

#

isn't a location

#

so he is unnable to have a .below[1]

alpine shale
#

ok, good

unborn sedge
#

Uh

#

for this

        Error Message: Tag <[pipe].above[1].flag[chest_pipe_input].inventory> is invalid! 
17:03:40 Additional Error Info: Unfilled or unrecognized sub-tag(s) 'inventory' for tag <[pipe].above[1].flag[chest_pipe_input].inventory>! 
17:03:40 Additional Error Info: The returned value from initial tag fragment '[pipe].above[1].flag[chest_pipe_input]' was: 'true'. ```
#

the returned value was "true" but isn't a has_flag check?

#

it's .flag[chest_pipe_input]

#

so why he is returned to true and not a locationtag?

#

this is the actual script part:

      - foreach <server.flag[inge_pipe]> as:pipe:
        - if <[pipe].above[1].has_flag[chest_pipe_input]>:
          - flag <[pipe]> items_pipe_bas:<[pipe].above[1].inventory.list_contents>
          - define chest_in_pipe <[pipe].above[1].flag[chest_pipe_input].inventory>
          - take item:<[chest_in_pipe].list_contents> from:<[chest_in_pipe]>
        - if <[pipe].has_flag[items_pipe_bas]>:
          - foreach <[pipe].flag[items_pipe_bas]> as:pipe_items_flag_bas:
            - if <[pipe].below[1].has_flag[ingepipe]>:
              - flag <[pipe].below[1]> items_pipe_bas:<[pipe].flag[items_pipe_bas]>
              - flag <[pipe]> items_pipe_bas:!
              - playeffect effect:crit_magic at:<[pipe].below[1]> quantity:10 visibility:10 offset:0.5
            - if <[pipe].below[1].has_flag[chest_pipe_output]>:
              - define chest_out_pipe <[pipe].below[1].flag[chest_pipe_output].inventory>
              - give <[chest_out_pipe].above[1].flag[items_pipe_bas]> to:<[chest_out_pipe]>
              - flag <[chest_out_pipe].above[1]> items_pipe_bas:!```
astral dock
#

flags are truthy by default.

#

E.g.

- flag <player> test
- narrate <player.flag[test]> 

Output: true

visual cairn
unborn sedge
#

Yeah, to explain i have a battery (a flagged block with the energy amount in value) and i need to make when some pipes are connected to this battery, the energy flag value was transfered inside all pipe connected

#

I can paste my script after, i just go out my work at now

#

I try using some things like find_flagged_blocks and flood_fill but don't working how i wanted

unborn sedge
visual cairn
#

you can't cancel a second

#

re line 126 lol

#

first thing i noticed

unborn sedge
#

oh

#

yeah x)

#

obviously

#

i probably need to use "on lightning strike" or something like this i forgot the name of the trigger but u understand me 😉

#

so what's about transfer flag value?

unborn sedge
#

ok so i try this:

      - foreach <server.flag[tesla_battery_wifis]> as:tbw:
        - flag <[tbw].flood_fill[100].types[block_flagged:tesla_pipe]> tesla_pipes_fuel:+:<[tbw].flag[tesla_battery_wifi_fuel]>
      - foreach <server.flag[tesla_pipee]> as:tesla_pipes:
        - if <[tesla_pipes].has_flag[tesla_pipes_fuel]>:
          - playeffect effect:electric_spark at:<[tesla_pipes]> offset:1
        - flag <[tesla_pipes].find_blocks_flagged[tesla_battery_wifi].within[1]> tesla_battery_wifi_fuel:0```

for me it's correct, maybe i don't understand how ``flood_fill`` work really?
shrewd helm
#

This is a giant chunk of glass blocks where I put some diamond_blocks and run flood_fill on the first one, and then looping through the list and then

  - modifyblock DIAMOND_BLOCK <[value]> 
  - wait 1s
compact bobcatBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@unborn sedge