View Single Post
  #7952    
Old February 26th, 2013 (5:58 PM).
Noossab Blue's Avatar
Noossab Blue Noossab Blue is offline
     
    Join Date: Dec 2012
    Location: USA
    Gender: Female
    Nature: Quirky
    Posts: 240
    I'm trying to create a simple yes/no trainer battle. Here is what I have:

    Spoiler:
    #dynamic 0x800000
    #org @begin
    lock
    faceplayer
    checktrainerflag 0x66
    compare lastresult 0x0
    if 0x1 goto @finished
    msgbox @ask 0x5
    compare lastresult 0x0
    if 0x1 goto @nope
    trainerbattle 0x0 0x66 0x0 0x81722C7 0x81722F9
    goto @finished

    #org @nope
    msgbox @no 0x6
    settrainerflag 0x66
    release
    end

    #org @finished
    msgbox 0x8172315 MSG_NORMAL '"Ssh! You'll scare the bugs away.\n..."
    end


    '---------
    ' Strings
    '---------
    #org 0x1722C7
    = Great! Let's battle our\nPOKéMON!

    #org 0x1722F9
    = No!\nCATERPIE can't hack it!

    #org 0x172315
    = Ssh! You'll scare the bugs away.\nAnother time, okay?

    #org @ask
    = Wanna battle?

    #org @no
    = No? Lame!


    It's close to working. The problem is, the trainer only asks if you want to battle once, so if you say no you can't change your mind and say yes until you enter another battle and come back to him. Conversely, if you say yes, the battle commences, but if you come back to him after another battle, he asks if you want to battle again, even though you already won...not sure why...
    __________________
    IGN: Anna/Noossab Blue
    3DS FC: 3196 3609 8450

    Thanks to SilverGrey for the awesome banner! Click to see!
    Current as of 1/31/14: I updated again!