Select randomly between two attacks?

I have two attacks 2 and 3 that are active at the same time when skullboss animation attack is playing how can I randomly select ether attack 2 or 3 and only have one of the attacks active?

events

You could trigger one of the attacks based on the value of a variable. For example, you could have a variable called AttackChooser and have an event that every few seconds changes the value back and forth between 2 and 3. Then, for each attack, you could have one of the conditions be “if the value of variable AttackChooser is 2” for attack 2, and “if the value of variable AttackChoose is 3” for attack 3.

If you want it to randomly select one you can use RandomInRange. It’d be like-
attackVariable = RandomInRange(1,2). then your two attack animations need conditions checking for your attackVariable and whether it’s 1 or 2. when the attack animation is finished (which would be another condition in another event) attackvariable could be switched back to 0, which could be the needed condition to set the attack variable to a new randominrange. Something like that would theoretically make your monster do random attacks one after another with no pauses and no overlapping

2 Likes

thanks that worked I added another attack animation and attached a variable “skullbossattack” to each attack using RandomInRange to select “skullbossattack” 1,2

events