View Single Post
Old August 9th, 2012 (7:26 PM).
aar2697 aar2697 is offline
    Join Date: Jun 2010
    Age: 20
    Gender: Male
    Posts: 37
    Originally Posted by SpadeEdge16 View Post
    For the guys who helped me last time, thank you! It was actually exactly what I needed. xD
    But now I'm having more script trouble, haha.
    This event works fairly well, except for two things.

    one: for some reason this battle keeps on being a double battle! ive set the trainerbattle's 1st parameter to 0x0,0x1,and 0x2 cause I'm not sure abotu those, and even when I only have one Pokemon it still seems to be a double, and I've made sure all of the A-trainer info is correct. Also, if I just defeat the Pokemon on the right, it says I've won the battle and continues the script.

    two: At the end when the opponent is supposed to walk away, off of the screen, but for some reason, she takes her first step, then vanishes. I've traied taking hidesprite off and using #raw 0x60 in the applymovement, ive also tried it the other way around, and when i dont use the hidesprite command, she will take her first movement, then freeze. the game doesnt freeze, just the character.

    and on another note, can someone tell me how to put things in spoilers? xD

    #dynamic 0x800000
    #org @start
    checkflag 0x161
    if 0x1 goto @done
    applymovement 0xFF @approach
    waitmovement 0xFF
    msgbox @ace 0x6
    applymovement 0x0 @notice
    waitmovement 0x0
    trainerbattle 0x2 0x6 0x3 @challenge @defeat @after

    #org @after
    msgbox @takeit 0x6
    additem 0x04 0xA
    fanfare 0x101
    msgbox @here 0x6
    setflag 0x161
    msgbox @bye 0x6
    applymovement 0x0 @leave
    applymovement 0xFF @watch
    waitmovement 0x0
    hidesprite 0x0

    #org @leave
    #raw 0x12
    #raw 0x11
    #raw 0x12
    #raw 0x12
    #raw 0x11
    #raw 0x11
    #raw 0x11
    #raw 0xFE

    #org @watch
    #raw 0x02
    #raw 0x01
    #raw 0xFE

    #org @here
    = [player] recieved POKEBALLS!

    #org @defeat
    = ACE: Not too bad for a beginner!

    #org @bye
    = ACE: Those are POKEBALLS!\nThey're used for catching new\lPOKEMON to join your team!\lI know you'll put them to good\luse!

    #org @takeit
    = ACE: Haha, not bad!\nYou know, you're one tough\ltrainer!\lI think someone like you could use\lthese!

    #org @challenge
    = ACE: Hey there! What's your name?\n...\lNice to meet you [player], my name is\lACE!\lI'm a new POKEMON TRAINER from\lFUSCHIA CITY!\lI heard that most people start on\lROUTE 1, so I came here and I\lcaught my first POKEMON!\lWhy don't you see for yourself!

    #org @ace
    = ACE: Poor flowers...\nHow can you guys grow in this kind\lof weather?

    #org @approach
    #raw 0x62
    #raw 0x18
    #raw 0x00
    #raw 0x18
    #raw 0x10
    #raw 0x13
    #raw 0x13
    #raw 0x13
    #raw 0x0
    #raw 0xFE

    #org @notice
    #raw 0x62
    #raw 0x01
    #raw 0xFE

    #org @done
    Put an "end" after the trainerbattle line.
    Give a Person ID to the person you're battling, which is a flag so make sure you set it appropriately, and put setflag 0x[] after the hidesprite line in the script. This will permanently hide that character rather than them reappearing. I don't know much about the player stuff, but I think 0xFF should be changed to MOVE_PLAYER. Oh, you could also set the Person ID to the flag you already have in the script, to make things more efficient.

    trainerbattle 0x0 is a simple battle with just challenge and defeat text, then the battle ends.
    trainerbattle 0x0 0xTR 0x0 @intro @defeat
    trainerbattle 0x1 continues to a script after defeat. You go to PokeCenter if you lose; after text doesn't show until you beat him.
    trainerbattle 0x1 0xTR 0x0 @intro @defeat @afterbattle
    trainerbattle 0x2 does the same as 0x1, but I don't know if there are any other differences.
    trainerbattle 0x1 0xTR 0x0 @intro @defeat @afterbattle
    trainerbattle 0x3 only has defeat text, but the script continues afterwards. It doesn't require an address to another part of the script, it just continues to the next line.
    trainerbattle 0x3 0xTR 0x0 @defeat
    trainerbattle 0x4 same as 0x2. Used in double battles, but might not require two Pokemon. I'm really not sure.
    trainerbattle 0x5 used for rebattles with V.S. Seeker. Uses same format as 0x0.
    trainerbattle 0x6 ????
    trainerbattle 0x7 same as 0x4
    trainerbattle 0x8 ????
    trainerbattle 0x9 This one has text for if you win and if the foe wins.
    trainerbattle 0x9 0xTR 0x0 @youwin @hewins

    Also, try using a different trainer for everything; trainer #0x6 might be glitched for you.