Are you not aware that the
tag exists? Cause it'd make this script a bit simpler.
... Also why are you forcing delay input to be ticks, instead of letting users input a duration?
Also, "random" is literally valid effect type input to the PlayEffect command, you don't need to custom-handle it.
loop with a define inside is just an overcomplicated
Also, once you make use of rotate_around tags, you start to realize that you don't need a loop command at all and can instead literally just one-line it with a clever tag.
(a bit long, but could be easily cleaned up by using a few defines).
Also, all of those
- if !<[somedef].exists>: - define somedef somedefault
are just overcomplicated fallbacks.
Also, what's with the
command? That looks like you just need an
Here's a quick and easy 11 lines that does the same as your 40+ lines.
Code: Select all
- define stepsize <[stepsize]||0.1>
- define loc <location[<[radius]||1>,0,0]>
- define stepmul <[stepsize].to_radians>
- define points <util.list_numbers_to[<element.div[<[stepsize]>]>]>
- define points <[points].parse_tag[<[center].add[<[loc].rotate_around_y[<[parse_value].mul[<[stepmul]>]>]>]>]>
- if <[delay]||0> != 0:
- foreach <[points]> as:point:
- playeffect effect:<[effect]||flame> at:<[point]> offset:0 quantity:2
- wait <[delay]>
- playeffect at:<[points]> effect:<[effect]||flame> offset:0 quantity:2
Denizen lead developer. On Discord as