-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- summons 3 bombs at randomized XZ locations, once bomb per tick
- Loading branch information
1 parent
4677d52
commit d9779f9
Showing
5 changed files
with
17 additions
and
18 deletions.
There are no files selected for viewing
4 changes: 0 additions & 4 deletions
4
...ey/data/entity/functions/hostile/omega-flowey/attack/bomb/indicator/initialize.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
# Set scores | ||
scoreboard players set @s attack.clock.i -1 | ||
scoreboard players operation @s attack.clock.i -= #attack-bomb attack.indicator.clock.delay | ||
|
||
scoreboard players operation @s attack.indicator.clock.length = #attack-bomb attack.indicator.clock.length | ||
|
||
# Set group ID | ||
function entity:group/set | ||
|
||
# Remove tags | ||
tag @s remove attack-indicator-new |
10 changes: 4 additions & 6 deletions
10
...a-flowey/data/entity/functions/hostile/omega-flowey/attack/bomb/indicator/loop.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
scoreboard players add @s attack.clock.i 1 | ||
|
||
# Ignore bullet summoning logic while `attack.clock.i` is negative | ||
execute if score @s attack.clock.i matches ..-1 run return 0 | ||
# Summon and initialize 2 bullets each tick | ||
function entity:hostile/omega-flowey/attack/bomb/indicator/loop/bullet/presummon | ||
function entity:hostile/omega-flowey/attack/bomb/indicator/loop/bullet/presummon | ||
|
||
# Summon a bullet | ||
execute if score @s attack.clock.i matches 5 run function entity:hostile/omega-flowey/attack/bomb/indicator/loop/bullet/presummon | ||
|
||
# Terminate after finger-gun shoot animation finishes | ||
# Terminate | ||
execute if score @s attack.clock.i >= @s attack.indicator.clock.length run function entity:hostile/omega-flowey/attack/bomb/indicator/terminate |
12 changes: 9 additions & 3 deletions
12
...ity/functions/hostile/omega-flowey/attack/bomb/indicator/loop/bullet/presummon.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
# Bullet summoning setup | ||
execute store result storage attack:bomb x double 0.01 run data get entity @s Pos[0] 100 | ||
execute store result storage attack:bomb z double 0.01 run data get entity @s Pos[2] 100 | ||
# Randomize x-position to summon bullet at (x: [-22..22]) | ||
execute store result score @s attack.position.x run random value -220..220 | ||
|
||
# Randomize z-position to summon bullet at (z: [-4..19]) | ||
execute store result score @s attack.position.z run random value -40..190 | ||
|
||
# Store position | ||
execute store result storage attack:bomb x double 0.1 run scoreboard players get @s attack.position.x | ||
execute store result storage attack:bomb z double 0.1 run scoreboard players get @s attack.position.z | ||
|
||
# Summon bullet | ||
function entity:hostile/omega-flowey/attack/bomb/indicator/loop/bullet/summon with storage attack:bomb |
8 changes: 3 additions & 5 deletions
8
...entity/functions/hostile/omega-flowey/attack/bomb/indicator/loop/bullet/summon.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# Summon bullet | ||
$execute positioned $(x) 45 $(z) rotated 0 0 run function animated_java:bomb/summon | ||
|
||
# Initialize bullet | ||
execute as @e[tag=attack-bullet-new] run function entity:hostile/omega-flowey/attack/bomb/bullet/initialize | ||
# Summon and initialize bullet | ||
$execute positioned $(x) 60 $(z) run function animated_java:bomb/summon | ||
execute as @e[tag=attack-bullet-new] at @s run function entity:hostile/omega-flowey/attack/bomb/bullet/initialize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters