Date: 2024/11/12 06:56:53 UTC-08:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
beam_template_script:
type: task
debug: false
script:
- playsound sound:block_trial_spawner_spawn_item_begin <player.location> volume:2.0
- define origin <player.location.add[0,1.3,0]>
- define current_location <[origin]>
- define direction <player.location.direction.vector>
# default range = 30
- define range 30
# de fault speed = 2
- define speed 2
#- define impact_amount 10
# default effect = dust_color_transition (if you change from dust, you must remove or modify the special data portion on the - playeffect command below)
- define effect dust_color_transition
# default particle_thickness = 10
- define particle_thickness 10
# default hit_effect = flash
- define hit_effect flash
# default hit_particle_thickness = 5
- define hit_particle_thickness 5
# default base_step_distance = 0.25 --> Do not change
- define base_step_distance 0.25
- define step_distance <[base_step_distance].mul[<[speed]>]>
- define step_vector <[direction].mul[<[step_distance]>]>
- repeat <[range].div[<[step_distance]>]> as:step:
- define current_location <[current_location].add[<[step_vector]>]>
- playeffect effect:<[effect]> quantity:<[particle_thickness]> at:<[current_location]> visibility:50 offset:0.1,0.1,0.1 special_data:1.0|white|red
- if <[current_location].material.is_solid>:
- playeffect at:<[current_location]> quantity:<[hit_particle_thickness]> effect:<[hit_effect]> visibility:50
- playsound sound:entity_firework_rocket_large_blast <[current_location]> volume:2.0
- stop
- if !<[current_location].find_entities.within[0.4].is_empty> && <[step]> >= 6:
- define hit_entity <[current_location].find_entities.within[0.4]>
- playeffect at:<[hit_entity].location> quantity:<[hit_particle_thickness]> effect:<[hit_effect]> offset:0,1,0
- playsound sound:entity_firework_rocket_large_blast <[hit_entity].location> volume:2.0
#- hurt <[impact_amount]> target:<[hit_entity]>
- stop
- wait 1t