• 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!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our 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] Marked Pokemon and Titles

I am trying to add marks on Pokemon like in Sword and Shield so some Pokemon will have a title when being sent into battle.
The idea is to give Pokemon a new variable called "marked" ranging between 0-45, where 0 means the Pokemon does not have a mark and will not receive a upon entering battle. I.E. "Go! Pikachu!"
and every number after 0 has it's own title. I.E. mark 3 "Go! Mankey the Pompous!" or mark 7 "Go! Snorlax the Apathetic!"

I have added marked as a accessor in PokeBattle_Pokemon and defined it by coping markings, but when I check if a Pokemon is marked when I enter a battle I get the message "undefined method marked".

I seem to be missing a step somewhere can anyone help me figure it out?
 

Attachments

  • [PokeCommunity.com] Marked Pokemon and Titles
    error.png
    42.4 KB · Views: 9
Yes you're correct. You are missing a step.

See, the problem is that marked is a Pokemon Property and not a Battler Property (because both are different objects, where Battler is a seperate entity existing only in battle which derives attributes from Pokemon object in your pary) so you need to make an accessor for marked to be used in battle.

So here's the code

Spoiler:


Now I don't know if my above code is correct as I am on mobile but please check and tell me if this works.
 
Thank you for the help, however after following your instructions it gives me an error for undefined . If I use 0 instead of i it will give me undefined method marked. (I used marked instead of markings in your code since I don't want to get it confused with the pc markings).
 

Attachments

  • [PokeCommunity.com] Marked Pokemon and Titles
    error1.png
    11.9 KB · Views: 5
  • [PokeCommunity.com] Marked Pokemon and Titles
    error2.png
    12 KB · Views: 4
Back
Top