• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - 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.

[Script✓] can soenone help me figure out this event?

  • 83
    Posts
    9
    Years
    • Seen Jun 21, 2024
    so, im trying to add legendary encounters,

    i copy and pasted this lugia event from base emerald and put it into an npc in the starting town for testing(i also changed to to lvl 5 for testing)

    the problem: after defeating it it reappears when i take 2 steps away, and also doesnt despawn after being caught.
    '---------------
    #org 0x2692A2
    lock
    faceplayer
    checksound
    pause 0x14
    sound 0x52
    setvar 0x8004 0x0
    setvar 0x8005 0x3
    setvar 0x8006 0x4
    setvar 0x8007 0x2
    special 0x138
    pause 0x1E
    sound 0x52
    setvar 0x8004 0x0
    setvar 0x8005 0x3
    setvar 0x8006 0x4
    setvar 0x8007 0x2
    special 0x138
    pause 0x1E
    pause 0x32
    checksound
    cry 0xF9 0x2
    waitcry
    pause 0x14
    setvar 0x8004 0xF9
    setvar 0x8005 0x46
    setvar 0x8006 0x0
    special 0x1E2
    setflag 0x8C1
    special 0x13A
    waitstate
    clearflag 0x8C1
    special2 LASTRESULT 0xB7
    compare LASTRESULT 0x1
    if 0x1 goto 0x8269336
    compare LASTRESULT 0x4
    if 0x1 goto 0x8269344
    compare LASTRESULT 0x5
    if 0x1 goto 0x8269344
    setflag 0x91
    release
    end

    '---------------
    #org 0x269336
    setflag 0x1DD
    setvar 0x8004 0xF9
    goto 0x8273776

    '---------------
    #org 0x269344
    setvar 0x8004 0xF9
    goto 0x8273776

    '---------------
    #org 0x273776
    fadescreen3 0x1
    hidesprite LASTTALKED
    fadescreen3 0x0
    bufferpokemon 0x0 0x8004
    msgbox 0x8273204 MSG_KEEPOPEN '"The [buffer1] flew away!"
    release
    end


    '---------
    ' Strings
    '---------
    #org 0x273204
    = The [buffer1] flew away!

    this script from sierrainfinty's tutorial also doesnt keep the event gone either

    #dynamic 0x800000

    #org @lugia
    lock
    faceplayer
    msgbox @1 0x6
    cry 0x6 0x0
    wildbattle 0xf9 0x5 0x0
    fadescreen 0x1
    fadescreen 0x0
    hidesprite 0x800F
    setflag 0x91
    release
    end

    #org @1
    = lugia: Raaarrgghh
     
    @Hexx17

    You should assign a flag to the sprite that you want to appear/disappear depending on what has happened in the game.

    That flag should be coherent with the flag that is used in the script.

    If you have no idea what I'm talking about, check Anthroyd's Gen III ROM Hacking Video Tutorial on Flags and Variables.
     
    @Hexx17

    You should assign a flag to the sprite that you want to appear/disappear depending on what has happened in the game.

    That flag should be coherent with the flag that is used in the script.

    If you have no idea what I'm talking about, check Anthroyd's Gen III ROM Hacking Video Tutorial on Flags and Variables.

    i changed the person id in advanced map to match the setflag and also set the hidesprite to the same 0x number. that seems to have worked, thanks
     
    Back
    Top