#This should work, right?

1 messages · Page 1 of 1 (latest)

cold sand
#
options:
    tracked_vehicle: minecart
    world: "world" or "world_nether" or "world_the_end"

on vehicle create:
    if event-world is {@world}:
        if event-entity is {@tracked_vehicle}:
            broadcast "it did the thing, mom"
        else:
            broadcast "this isn't a valid vehicle"

I know I'm missing something really simple here so I broke the code down to just do this and it's still not doing the thing.

ionic wren
#

make sure to debug fully first

cold sand
#

I understand it's the line if event-entity is {@tracked_vehicle}:
that's causing issues but everything looks correct, and I've tried everything under the sun to check if it's the right entity and I just feel dumb at this point

shell sage
#

make world option a list of the worlds

proud totem
#

have you broadcasted the type of entity?

cold sand
#

ahh, this do be a problem indeed, okay

celest hinge
#

iirc event-vehicle

cold sand
#

The docs say the only event values are event-world, event-entity, and event-entity. I tried that though and no-go.

gaunt fiber
gaunt fiber
#

try this

cold sand
#

The world check isn't the issue. That part's working.

celest hinge
#

broadcast event-entity and see what it says

#

I know one of the event-entities is the player that placed it

cold sand
#

It doesn't broadcast at all that way and if I do broadcast "%event-entity%" it literally only says <none> when I place a vehicle.

It doesn't count the player as an event-entity because a dispenser can place it as well. I thought it would too because it makes sense but it doesn't. So I'm kinda back to square one

proud totem
#

@cold sand

celest hinge
#

I tested the code (my own) and waited a tick, and it still doesn't broadcast the entity

cold sand
#

Yup. I’m doing a completely different approach to my original plan now, since I can’t sort out which vehicles are being placed nor by who. It is what it is. 😩

cold sand