Runestone_Projectile_Task: type: task definitions: damage|projectile|color script: - define loc1 - define loc2 - if <[damage]||null> == null: - define damage 1 - if <[projectile]||null> == null: - define projectile air - if <[color]||null> == null: - define color white - define color <&ns>]> - spawn item_display[item=<[projectile]>;scale=0.5,0.5,0.5] <[loc1]> save:projectile_entity - define projectile_entity - adjust <[projectile_entity]> teleport_duration:2.75 - wait 2t - teleport <[projectile_entity]> <[loc2]> - define target_list - foreach <[loc1].points_between[<[loc2]>].distance[0.5]> as:value: - playeffect effect:dust special_data:2|]> at:<[value]> offset:0 - wait 2t #- narrate <[projectile_entity].location> - foreach <[value].find_entities.within[1].exclude[|<[projectile_entity]>]> as:target: - if <[target]> in <[target_list]>: - foreach stop #- narrate "found <[target].entity_type>" - define target_list:->:<[target]> - hurt <[damage]> <[target]>