#Spawning entities after something happened

1 messages · Page 1 of 1 (latest)

polar hazel
#

How would i code something to happen after a event occurs, i.e, after a fireball explodes, a aoe cloud spawns.

ocean sonnet
#

but you can use different ways for each

#

for ace, (area cloud effect), you can use execute if entity @e[type=area_cloud_effect,nbt={whatever}] run stuff

#

fireballs...well...you can just execute as @e[type=fireballs] unless block ~ ~-0.5 ~ air run stuff

polar hazel
#

so would this command make it so after a fireball explodes a ace would spawn in next to it?

ocean sonnet
#

just add run summon area_cloud_effect with the nbt attached after that

polar hazel
#

ah ok

#

what would I put for the NBT?

ocean sonnet
#

look it up on the wiki

polar hazel
#

I'm pretty new to datapacking

#

ok

#

the minecraft wiki right?

ocean sonnet
#

here

polar hazel
#

thank you

#

how would i summon the fireball to a specific area?

#

is there a certain way to do that?

ocean sonnet
polar hazel
#

ahh ok

ocean sonnet
#

execute as @e[type=fireballs] at @s unless block ~ ~-0.5 ~ air run summon area_cloud_effect

polar hazel
#

tysm

#

one more question, what if i wanted multiple ace's that are like spaced out

ocean sonnet
#

just summon multiple

#

at a different location

polar hazel
#

how would that work with the fireball?

ocean sonnet
#

and in the fireball cmd run the function

#

in the function

#

summon area_cloud_effect ~ ~ ~

#

summon area_cloud_effect ~1 ~ ~

#

summon area_cloud_effect ~-1 ~ ~

#

for example, on the x axis

polar hazel
#

ah ok

ocean sonnet
#

by 1 block

polar hazel
#

thanks for all the help

ocean sonnet
#

ur welcome

austere pike
#

Btw, it's area_effect_cloud, area_cloud_effect won't work

polar hazel
#

👍