-
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.
- falls slow at start, then falls fast and explodes when hits ground
- Loading branch information
1 parent
d9779f9
commit 1e3e74b
Showing
5 changed files
with
33 additions
and
15 deletions.
There are no files selected for viewing
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
25 changes: 19 additions & 6 deletions
25
...mega-flowey/data/entity/functions/hostile/omega-flowey/attack/bomb/bullet/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,11 +1,24 @@ | ||
scoreboard players add @s attack.clock.i 1 | ||
|
||
data merge storage utils:damage { damage: 2, radius: 1 } | ||
execute positioned ~ ~-1.5 ~ run function entity:utils/damage with storage utils:damage | ||
# this is a rect volume, size is 18x(28+36)x18 | ||
# y-bound is -28 to +36 | ||
data merge storage utils:damage { damage: 2, radius: 1.8 } | ||
exeute positioned ~ ~-2 ~ run function entity:utils/damage with storage utils:damage | ||
exeute positioned ~ ~ ~ run function entity:utils/damage with storage utils:damage | ||
exeute positioned ~ ~2 ~ run function entity:utils/damage with storage utils:damage | ||
|
||
# Move forward | ||
function entity:hostile/omega-flowey/attack/bomb/bullet/loop/move | ||
# Move down slowly during summon animation | ||
execute if score @s attack.clock.i matches 0..15 run teleport @s ~ ~-0.5 ~ | ||
|
||
# TODO(60): validate/determine a value for how long until the bomb bullets terminate | ||
# Play falling sound once when we start falling faster | ||
execute if score @s attack.clock.i matches 20 run function entity:hostile/omega-flowey/attack/bomb/bullet/loop/start_falling | ||
|
||
# Move down faster during actual fall after a delay | ||
execute if score @s attack.clock.i matches 20.. run teleport @s ~ ~-2.2 ~ | ||
|
||
# Stop falling after bomb falls through floor | ||
execute at @s if entity @s[x=-100,dx=200,y=33,dy=-20,z=-100,dz=200] run function entity:hostile/omega-flowey/attack/bomb/bullet/loop/stop_falling | ||
|
||
# TODO(): validate/determine a value for how long until the bomb bullets terminate | ||
# Terminate after X seconds | ||
execute if score @s attack.clock.i matches 60.. run function entity:hostile/omega-flowey/attack/bomb/bullet/terminate | ||
execute if score @s attack.clock.i matches 39.. run function entity:hostile/omega-flowey/attack/bomb/bullet/terminate |
3 changes: 0 additions & 3 deletions
3
...flowey/data/entity/functions/hostile/omega-flowey/attack/bomb/bullet/loop/move.mcfunction
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
...ta/entity/functions/hostile/omega-flowey/attack/bomb/bullet/loop/start_falling.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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
stopsound @a hostile omega-flowey:attack.bomb.fall | ||
playsound omega-flowey:attack.bomb.fall hostile @a ~ ~ ~ 5 1 |
10 changes: 10 additions & 0 deletions
10
...ata/entity/functions/hostile/omega-flowey/attack/bomb/bullet/loop/stop_falling.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Keep consistent y-pos | ||
teleport @s ~ 33.0 ~ | ||
|
||
# Play animation if we just stopped falling | ||
execute unless entity @s[tag=is_done_falling] run function animated_java:bomb/animations/explode/play | ||
execute unless entity @s[tag=is_done_falling] run stopsound @a hostile omega-flowey:attack.bomb.explode | ||
execute unless entity @s[tag=is_done_falling] run playsound omega-flowey:attack.bomb.explode hostile @a ~ ~ ~ 5 1 | ||
|
||
# Add tags | ||
tag @s add is_done_falling |