Date: 2020/01/13 19:01:57 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
40
41
42
bat_sphere:
type: task
debug: true
script:
- define 18th:<util.pi.div[9]>
- define arc:<[18th].mul[2]>
#- narrate <[18th]>
- define batzz:<list[]>
- repeat 3 as:ring:
- define rY:<element[0.9].mul[<[ring]>]>
#- narrate <[ring]>,<[rY]>
- repeat 18 as:loop:
#- narrate <[loop]>,<location[1.5,<[rY]>,0].rotate_around_y[<[18th].mul[<[loop]>]>]>
- spawn target_me location:<player.location.add[<location[1.5,<[rY]>,0].rotate_around_y[<[18th].mul[<[loop]>]>]>]> save:B_swarm
- define batzz:<[batzz].include[<entry[B_swarm].spawned_entity>]>
- flag <entry[B_swarm].spawned_entity> rad:<[arc].mul[<[loop]>]>
- flag <entry[B_swarm].spawned_entity> addY:<[rY]>
#- narrate <[batzz].parse[entity_type]>
- repeat 1:
- foreach <[batzz]> as:b:
#- define rand_h:<player.location.add[<location[1.5,0,0].rotate_around_y[<util.random.decimal[0].to[<[2pi]>]>]>]>
#- define rand_v:<player.location.add[<location[0,1.5,0].rotate_around_x[<util.random.decimal[0].to[<[2pi]>]>]>]>
#- narrate <[loop_index]>
#- narrate <[b].list_flags>
#- narrate rad:rad(<[b].flag[rad]>)
#- narrate <[b].flag[rad]>+<[18th]>=<[b].flag[rad].add[<[18th]>]>
- define newrad:<[b].flag[rad].add[<[arc]>]>
#- narrate new:<[newrad]>
- define addloc:<location[1.5,<[b].flag[addy]>,0].rotate_around_y[<[b].flag[rad].add[<[arc]>]>].xyz>
#- narrate <[addloc]>
#- narrate <player.location.add[<[newloc]>]>
- flag <[b]> rad:<[newrad]>
#- narrate update:<[b].flag[rad]>
#- narrate <[b].substring[32]>
#- narrate <[b].location.simple>
#- narrate <player.location.add[<[addloc]>].simple>
- narrate (------------<[loop_index]>------------)
- push <[b]>
origin:<[b].location>
destination:<player.location.add[<[addloc]>]>
speed:0.2
- wait 40t