Setting initiative order for RPG

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi all,

    I'm working on an RPG and when the player has an encounter, I want to roll for initiative and set the order for battle. Now I have successfully been able to "roll" initiative for each monster by identifying them and assigning a rondom number from 1-20 to the alt value "initiative_rolled" of each monster.

    However, I'm stuck for the next step: how can I set the order between monsters based on this initiative_rolled. I want to set the order from 1,2,3 etc until all monsters (and players) have a turn number. Of course some monsters may have the same initiative rolled, so I need to deal with that as well.

    Any suggestions? I tried On each one of "Enemy" loop "order_initiative" AND initiative rolled = 20 -> set Monster "initiative_order" to 1+var_order AND add 1 to var_order , but it's not allowing me to filter this way.

    Sorry about the terrible explanation, I'm not a programmer obviously :D Help very much appreciated, thank you!

  • There's an event that allows you to scope which object you want by max/min value - "Pick or count > Pick (object name[s]) with maximum expression value".


    You might also want to nest another selection like "pick object at random" so that if two enemys have the same initiative they won't take their turn at the same time (unless you want that of course)

  • Thanks for your response Marbenx! I watched a tutorial on the ForEach function and realized I had not been doing it correctly, as I was not starting the ForEach loop with an action. After this I managed to get it work:

    - First I scope the group of enemies with Initative roll 20 and then set the action "Start loop for each enemy "set_order" "

    - On each one of "enemy" loop name "set_order" -> set alt value "enemy_order" to 1 + variable_order & Add 1 to variable_order

    If I call loop "set_order" in separate conditions for all initiative rolls 19, 18, 17 etc is works perfect, so case closed! :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!