20 lines
1.0 KiB
Mcfunction
20 lines
1.0 KiB
Mcfunction
tellraw @a[scores={me-debugging=1..}] "undeadm-m1:spawn/magic_missile"
|
|
|
|
summon minecraft:armor_stand ^ ^ ^1 {Invisible:1b,Marker:1,Tags:["EntityTimer","FireBlast","Init"]}
|
|
|
|
# link uid to player
|
|
execute at @s as @e[tag=Init] store result score @s me-core_uid run scoreboard players get @p me-core_uid
|
|
|
|
# init variables
|
|
execute as @e[tag=Init] run scoreboard players set @s me-core_entityMT 40
|
|
execute as @e[tag=Init] run scoreboard players set @s me-core_entityC1 35
|
|
execute as @e[tag=Init] run scoreboard players set @s me-core_entityPI 1
|
|
|
|
## give projectile data
|
|
# get rotation from player (so it aims the same way)
|
|
execute as @e[tag=FireBlast,tag=Init] if score @s me-core_uid = @p me-core_uid store result entity @s Rotation[0] float 1 run data get entity @p Rotation[0] 1
|
|
execute as @e[tag=FireBlast,tag=Init] if score @s me-core_uid = @p me-core_uid store result entity @s Rotation[1] float 1 run data get entity @p Rotation[1] 1
|
|
|
|
# stop projectile from getting any more init data
|
|
execute as @e[tag=Init] run tag @s remove Init
|