So In my game, for boss battles, after they are done wth an attack move, I want them to pick 1 of 2 different numbers to determine which attack to do next. However I think It’s picking a whole number within the whole RANGE bewtween the 2 numbers, instead of just of 2 different numbers I want it to pick. I noticed the boss keeps using the same 2 attcks over and over while rarely changing it up…
Basically, right before the attack changes (When the boolean ReadyToChange is flipped to True), the variable for AttackMove is saved to CurrentMoveTracker, and then it sets MoveTransitionSelection to a random number in range, and then that selected number determines the next move by setting the AttackMove variable to the selected number.
where is the action that change [currentmovetracker] ?
its currentmovetracker that initiate the whole logic chain. if no action changes that variable, the logic chain will start at the exact same place.
you must include a way to change the root of the chain, if you implement that at the end of the chain (aka, the end start another root) then you got a very nice way for your boss to always switch between many states (which would be semi-predictable and super cool)
RandomInRange() and Random() does not generate a real number, it DOES in fact generate an integer. to generate a real number, people use RandomFloatInRange() or simply RandomFloat()
I haven’t checked the link that was provided but I know there’s some faulty links around for that extension. I did check this link a month ago and it was a working version. This is a direct link, as soon as you click it, it will start downloading. https://github.com/GDevelopApp/GDevelop-extensions/files/7313760/Choose.zip
Here is my original posting of the link including a link to the page it’s from. Tuto for creating a function in GDevelop - #33 by Bubble I haven’t read the details in your topic so the fact that I’m providing the link is not an endorsement that it will solve your problem.
I’m still confused. I’ve never used arrays before. I just copy pasted your code suggestion, but it’s not working. How do I do this? do I add MyBossMoves as another variable?