How do i make people go down the line in chacter roster

So When a person presses f and x amoubt is = to y then I want them to go to the next chacter in the roster

You can get a list of all heroes with “All Heroes”. You need to use that. What do you need to happen when they reach the end of the roster?

If you want it to wrap to the first hero, then you want something like,

  • Start forcing player to be hero,
  • Get value from ‘All Heroes’
  • Index is “index of player’s current hero + 1”, modulo “count of (all Heroes)”.

This turns into a rather long action;

Start forcing player to be hero
Player = event player
Hero = Value in array
_array = all heroes
_index = modulo
__value = add
___value = number
____number = 1
___value = index of array value
____array = all heroes
____value = hero of
_____player = event player
___value = count of
____array = all heroes

There is a catch, though. “All Heroes” doesn’t order the heroes the same as in the roster. If you want it to match the roster, you’ll have to manually create your own hero list, like so:

Ongoing global event (no conditions)
Set Global Variable H, Empty Array
Modify Global Variable H, Append To Array, Hero (DVA)
Modify Global Variable H, Append To Array, Hero (ROADHOG)
Modify Global Variable H, Append To Array, Hero (REINHARDT)

etc

Then, wherever you see “All heroes” above, replace with “Global Variable H”

Set Player Allowed Heroes (Event Player, Global Variable (Event Player, H))