#summon projectile with velocity

1 messages · Page 1 of 1 (latest)

teal rivet
#

the entity has the minecraft:projectile component, but the "power" value is ignored when summoned

#

im summoning it with an mcfunction, and afaict the summon command in bedrock edition doesnt have a way to add movement with NBT tags

silver quail
#

With /summon it won’t have power. It only works if an entity shoots it or you use the spawn entity component in an entity. There probably is other exceptions that I am unaware of though.

teal rivet
#

i made sure the entity has "is_spawnable": true

#

nvm, i just didnt set the min, max_wait_time values so they defaulted to 300 and 600

teal rivet
#

so now the entity spawns, but it still isnt "shot"

#

it just falls to the ground, even when i set the power to 10

silver quail
#

Can you send the projectile component?

teal rivet
#
     "minecraft:projectile": {
      "on_hit": {
        "impact_damage": {
          "damage": 10,
          "knockback": false,
          "semi_random_diff_damage": false,
          "catch_fire": true,
          "destroy_on_hit": true
        },
       "definition_event": {
        "affect_projectile": true,
        "event_trigger": "minecraft:explode"
       },
       "hurt_owner": {
        "owner_damage": 0,
        "ignite": false,
        "knockback": false
       }
      },
      "power": 10,
      "gravity": 0.00,
      "inertia": 1,
      "liquid_inertia": 1,
      "uncertainty_base": 0,
      "uncertainty_multiplier": 0,
      "anchor": 1,
      "offset": [ 0 , 0, 0 ],
      "reflect_on_hurt": false,
      "catch_fire": true,
      "hit_sound": "block.turtle_egg.break"
     },
#

dont mind the minecraft:explode event trigger, i set fuse_lit to false, i just used it for testing

teal rivet
#

got it all figured out

hushed dagger
#

how did you do it? I have the same problem @teal rivet ?

teal rivet
#

you have to spawn the projectile from another entity with the "minecraft:spawn_entity" component

hushed dagger
#

i did that in the player.json file

#

it still doesnt have any velocity

teal rivet
#

hm

#

is it in a component group that gets added by an event?

hushed dagger
#

yes

#

exacly

teal rivet
#

and did you set the "power" in the projectile?

hushed dagger
#

yes

teal rivet
#

weird

hushed dagger
#

it is very wierd

teal rivet
#

i cant really think of any issues if you did all that

#

maybe check the format versions of your files

#

i had wrong format versions a couple times and that messed things up for me

hushed dagger
#

i did that also hahahaha

teal rivet
#

lmao

hushed dagger
#

there is a tutorial on bedrock wiki about this

#

and i even copy pasted it

#

and yet it just doesnt work

teal rivet
#

does the projectile entity spawn?

hushed dagger
#

yes

#

on the player coordinates

teal rivet
#

and it just falls down

hushed dagger
#

yes

teal rivet
#

hm

#

very weird

hushed dagger
#

it doesnt exacly fall

#

it hits the player

#

when it starts falling

teal rivet
#

oh maybe try giving the projectile the "runtime_identifier" of "minecraft:snowball"

hushed dagger
#

did that

teal rivet
#

oh if it hits the player maybe also give it an offset

hushed dagger
teal rivet
#

check if it works if you give it an x offset of like 2 or so

hushed dagger
#

ok i will try that

teal rivet
#

i think the collision box might be so big that it collides with the player instantly when it spawns

#

also, make it "minecraft:snowball" not with a .

hushed dagger
#

it was the dot

#

frick

#

Thanks man

#

i am realyy sloppy

teal rivet
#

hahah no worries

hushed dagger
#

you are a great dude

teal rivet
#

that kinda stuff is always what you spend hours on

hushed dagger
#

yes

#

you understand the struggle

teal rivet
#

yep

#

i think the vscode minecraft bedrock extension even autocompletes it with a dot

#

but its jut not correct lol

hushed dagger
#

yes