I am trying to randomize firework attributes using vanilla skript. I wanted to randomize the firework type, color, and effect so I tried the following:
What is the correct way to code this?
Code:
on load:
clear {fireworkAttr::*}
add "gold" to {fireworkAttr::color::*}
add "blue" to {fireworkAttr::color::*}
add "green" to {fireworkAttr::color::*}
add "aqua" to {fireworkAttr::color::*}
add "red" to {fireworkAttr::color::*}
# Repeat for all attributes
command /rfw:
trigger:
set {_fireworkColor1} to a random element out of {fireworkAttr::color::*}
send "The random color is %{_fireworkColor1}%" to player
launch flickering trailing burst firework colored {_fireworkColor1} at player
What is the correct way to code this?