• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

NPC checfklag event does not work

18
Posts
1
Years
    • Seen Nov 9, 2023
    Im making an NPC in an early town and this flag is supposed to see if you beat the elite four. Even though i did beat the elite four, the event wont trigger. Can anyone help me point out the problem? The two flags in the second section are one for activating the old sea map and one for setting the flag for this event in itself-



    '---------------
    #org 0xE56D2D
    checkflag 0x4FE
    if 0x1 goto 0x8E56D41
    msgbox 0x8E56D63 0x6 '"Oh! No.. You are not strong enough..."
    release
    end

    '---------------
    #org 0xE56D41
    msgbox 0x8E56DB5 0x6 '"Oh! You defeated the champion.\nHe..."
    giveitem 0x178 0x1 0x0
    setflag 0x13C
    fadescreen 0x1
    hidesprite 0x5
    fadescreen 0x0
    setflag 0x42
    release
    end

    '---------
    ' Strings
    '---------
    #org 0xE56D63
    = Oh! No.. You are not strong enough\nkid. Come back after defeating the\lchampion.

    #org 0xE56DB5
    = Oh! You defeated the champion.\nHere take this Old Sea Map and\ltake it to LILLYCOVE. Challenge\lthe Old Island.
     
    10
    Posts
    3
    Years
  • I'm assuming you are on Emerlald, right?
    Cause then it's not your script, it's flag 0x4FE not doing what you think it does.
    I looked up the flags you used in this thread.

    "0x4FE : Player has defeated Elite Four Drake, cleared after becoming champ"
    So it's set back to 0x0 after beating the Elite Four and won't work for your event. I believe you can use this one instead:
    "0x864 : Player has beaten Elite Four, checked in secret bases"

    I also found another flag for the Old Sea Map:
    "0x8D6 : Activates Old Sea Map"

    Also put a testing NPC next to your actual NPC that sets the flag you use for the if statement.
    So you can check if both paths of your script work as intended, just as a little tip to save time :)
     
    Last edited:
    Back
    Top