• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Comparing variables to find the largest value

  • 5
    Posts
    5
    Years
    • Seen Mar 29, 2020
    For my game I'm using a personality test to determine your starter like the Mystery Dungeon games. I,m doing this by having the first question determine what type the starter is and the rest of the questions giving a value between 0-5 to the starters with the highest value Pokemon given to the player at the end. I was advised to use a script because it would get very messy but since I have no idea what I'm doing I found this script online but I cannot get it to work.
    v = $game_variablesm = [v[26], v[27], v[28], v[29] v[30]].maxr = []r.push(26) if v[26] == mr.push(27) if v[27] == mr.push(28) if v[28] == mr.push(29) if v[29] == mr.push(30) if v[30] == m$game_variables[41] = r[rand(r.size)]
    Any help would be appreciated.
     
    Back
    Top