• 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!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

V19 - Showing icon based on form

  • 752
    Posts
    14
    Years
    • UK
    • Seen Dec 29, 2024
    I'm trying to do a script that shows the Pokémon available on map. I have it loading the data in and showing correctly for the majority, but struggling to work out how to do forms.

    The code I have currently. The print gives me :RATTATA_1

    Code:
    species=havespecies[i]
              p species
              # Show Pokémon icon
              @sprites["icon#{i}"]=PokemonSpeciesIconSprite.new(species,@viewport)
              @sprites["icon#{i}"].x=24+100*(i%ICONSPERROW)
              @sprites["icon#{i}"].y=80+100*(i/ICONSPERROW).floor
    
              if $Trainer.owned?(species)
                @sprites["caught#{i}"].setBitmap("Graphics/Pictures/Custom/mapencounters-caught")
                seen+=1; caught+=1
              elsif $Trainer.seen?(species)
                @sprites["caught#{i}"].setBitmap("Graphics/Pictures/Custom/mapencounters-notcaught")
                seen+=1
              else
                @sprites["caught#{i}"].setBitmap("Graphics/Pictures/Custom/mapencounters-notcaught")
                @sprites["icon#{i}"].tone=Tone.new(-255,-255,-255) # Blacked out
              end

    I only have the standard Rattata registered in the Pokédex, not the Alolan, which is form 1, but as you can see from the attachment, Rattata is in there twice, though with no icon and shows as seen when the form isn't.
     

    Attachments

    • [PokeCommunity.com] V19 - Showing icon based on form
      Screenshot 2021-05-03 at 18.53.18.png
      42.8 KB · Views: 100
    Back
    Top