• 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!
  • Cyndy, May, Hero (Conquest), or Wes - 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.

Show Choices Before Trainer Battle

  • 11
    Posts
    8
    Years
    • Seen Jan 22, 2017
    I am new to RPGMaker & Ruby, but I am a programmer. I'm having an issue getting NPCs to ask the player if they want to battle and subsequently allow the player to select yes or no. When I write battle code and playtest, my code gets re-written and my show choices branch goes away. If anyone has any advice about this please let me know, I'm sure there is a simple fix. Here is my code so far...

    @>Text: Would you like to battle?
    @>Show Choices: Yes, No
    :When[Yes]
    @>Comment: Battle: !
    @>Comment: Type: BREEDER
    @>Comment: Name: Bob
    @>Comment: Endspeech: ?
    @>
    :When[No]
    @>Text: !
    @>
    :Branch End

    Thanks!
     
    Last edited by a moderator:
    Well, I see nothing wrong with what you had written. I'm not sure why it wouldn't work. I set up a similar event, as shown in the below image, and everything worked perfectly fine.

    [PokeCommunity.com] Show Choices Before Trainer Battle
     
    Thanks SpartaLazor. I'll keep looking into it. Just like you, I'm not sure why I am having an issue. If anyone else has feedback, please continue to post.
     
    Comments are rewriting your event page. What you need is the script in the conditional branch. Just follow sparta lazor's example. I personally don't use comments anymore, you should try an excel file.
     
    Last edited:
    Back
    Top