• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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

  • 773
    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