1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Guest, PO has ceased our separate tiering and adopted Smogon tiers for SM. More information and updates here.

    Dismiss Notice

[Battle Scripting] Battle scripting (next update)

Discussion in 'Server and Client Scripting' started by coyotte508, Jul 14, 2012.

  1. MidwayMarshall

    MidwayMarshall woof Forum Moderator Developer Forum Moderator Developer

    Joined:
    Jun 13, 2014
    Messages:
    303
    Likes Received:
    170
    That's because onBattleEnd(result, winner) is in response to the backend receiving the BattleEnd network message. If you close the battle window you are no longer listening to the battle nor is the script going to run in limbo.
     
  2. Nightfall Alicorn

    Nightfall Alicorn Left Pokémon Online, most likely not coming back.

    Joined:
    Oct 15, 2013
    Messages:
    491
    Likes Received:
    171
    PO Trainer Name:
    Nightmare Moon
    I'm guessing it's not possible at the moment for a onBeforeWindowClose event. So much for that idea. :c
     
  3. Pumone

    Pumone Member

    Joined:
    Aug 30, 2015
    Messages:
    60
    Likes Received:
    13
  4. Nightfall Alicorn

    Nightfall Alicorn Left Pokémon Online, most likely not coming back.

    Joined:
    Oct 15, 2013
    Messages:
    491
    Likes Received:
    171
    PO Trainer Name:
    Nightmare Moon
    Open 2 windows, but you would need to edit the script so it doesn't play in both same time.
     
  5. Pumone

    Pumone Member

    Joined:
    Aug 30, 2015
    Messages:
    60
    Likes Received:
    13
    The problem remains, if I open 2 windows I can only battle me vs me or bot vs bot. I need to find a way to do me vs bot.
     
  6. IceKirby

    IceKirby A.K.A. RiceKirby

    Joined:
    Apr 26, 2011
    Messages:
    2,176
    Likes Received:
    635
    PO Trainer Name:
    RiceKirby
    You could try to add a condition to only run the script if the user is under the name X.