#(j3t59) C4 Listing locations and Foreach Location - Explode

1 messages · Page 1 of 1 (latest)

fossil yoke
#

Creating C4 and exploding on right click with Detonator, im trying to make a list of locations when the block is placed and then Explode on all the locations in the list in question

lethal fractalBOT
#

(j3t59) J3T59

lethal fractalBOT
#

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.

fossil yoke
#

current iteration /\

#

im not certain that im supposed to use tablist but i cant really find in the MetaDocs what i should be using to create a list

#

i made a mistake when naming the ticket, sorry 🥺

#

(j3t59) C4 Listing locations and Foreach Location - Explode

woven star
#

!g flags

ember urchinBOT
fossil yoke
#

i am still having problems with non-existent definitions

tawny zephyr
#

Do you have a user called Bombloc? lol

#

The tag does not make sense at all it returns if even, a single location

#

You want to return the players flag

#

not the player called 'Bombloc's location

fossil yoke
#

fixed <player.flag[Bombloc]> 😅

#

testing now

tawny zephyr
#

yay

main raftBOT
#

+> YAY!!!

fossil yoke
#

no detonation

tawny zephyr
#

!debug

ember urchinBOT
# tawny zephyr !debug
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

fossil yoke
tawny zephyr
#

Oh you want a list

#

Use the :->: data action

#

!guide short term memory

ember urchinBOT
tawny zephyr
#

check the data action section ^

fossil yoke
#

will do

#

what is the syntax for using Def lists in a foreach loop? i am staring at the meta and still confused

tawny zephyr
#

can be any tag that returns a list

#

if you save a list in the flag, you can just leave it as is

#

currently you saving a single value and replacing it each time you save a new one

#

by using the data action :->: you add a value to it

#

and turn the value of the flag into a list

fossil yoke
#

so i do - flag <player> Bombloc:->:<player.cursor_on>

tawny zephyr
#

ye

fossil yoke
#

okay

#

testing

tawny zephyr
#

Well

#

You only showing saving values

#

You need to right click a block with Detonator item

#

to trigger the event

fossil yoke
#

im using an old Detonator

#

thats why

#

i mispelled it as "Detinator"

tawny zephyr
#

agh

#

nice

#

do you need more help?

#

or are you going to C4 the hell out of your server

fossil yoke
#

its just launching me in the air at player location

#

the flag is attatched to the player isnt it

#

new paste

tawny zephyr
#

Oh yeah

#

!c foreach

ember urchinBOT
# tawny zephyr !c foreach
Group

queue

Syntax

foreach [stop/next/<object>|...] (as:<name>) (key:<name>) [<commands>]

Short Description

Loops through a ListTag, running a set of commands for each item.

Description

Loops through a ListTag of any type. For each item in the ListTag, the specified commands will be ran for that list entry.

Alternately, specify a map tag to loop over the set of key/value pairs in the map, where the key will be <[key]> and the value will be <[value]>.
Specify "key:<name>" to set the key definition name (if unset, will be "key").

Specify "as:<name>" to set the value definition name (if unset, will be "value").
Use "as:__player" to change the queue's player link, or "as:__npc" t...

tawny zephyr
#

To get the 'value' of the list, you need either the default definition of foreach or set your own one

#

and then use that instead of player.flag[bombloc]

fossil yoke
#

im lost at Default Definition

tawny zephyr
#

psps check the meta c:

#

you can click on the blue Command: Foreach

fossil yoke
#

so i need to make a Maptag? my brain is hurting a little reading over the same thing 8 times

tawny zephyr
#

no uh

#

either use as:definition_name

#

or <[value]>

#

If you check the examples it should be pretty straight forward

fossil yoke
#

okay, yea, ive got that, ill update the paste

tawny zephyr
#

I will go to sleep now

fossil yoke
#

okay, ill keep at this as much as i can

fossil yoke
#

Made a workaround in a way i can understand

#

it works

#

found bug but fixed it

fossil yoke
#

Im trying to flag an item being placed into a <context.entity.inventory> and i am stareing at the Inventory Meta

#

is it - inventory set/flag? and the flag name is the name of the item?

silver forgeBOT
fossil yoke
#

or a second separate line with - inventory flag origin:Primed_Cfour

tawny zephyr
#

@fossil yoke do you still need help with that

#

if so provide your current script and debug, otherwise

robust elmBOT
#
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.)

#

@fossil yoke

fossil yoke
#

I could still use help, I have some errands to run, I'll supply a debug sometime today

fossil yoke
fossil yoke
#

made a new paste, going to run a new test

sleek meadow
fossil yoke
#

Sorry, should have closed this thread, I recently moved my OS to Arch and lost all of my old code, on top of that I can't use VS Code anymore or implement the Denizen extensions for it

#

I'm trying to set up NeoVim but it's still going to be some time for me to figure out my OS

sleek meadow
#

or open a new one

fossil yoke
#

I'll probably just open a new one because I lost all of my old code anyway

#

How do I close the ticket again?

sleek meadow
#

@fossil yoke