all is in the question, how can i coding that an enemy choose randomly between several patterns, example, he have two different attacks and he choose at random between them, i see the expression "choose" but i think i cant use that, i was thinking something like :
function 1 = first attack pattern
function 2 = second attack pattern
anbd expression choose (functiin1, function 2) but the expression choose is just for parameters not function i guess.
"choose(a, b [, c...])
Choose one of the given parameters at random. E.g. choose(1, 3, 9, 20) randomly picks one of the four numbers and returns that. This also works with strings, e.g. choose("Hello", "Hi") returns either Hello or Hi. Any number of parameters can be used as long as there are at least two."
Ty for help.