• 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.

Explorer Kit-like "warper"

6
Posts
3
Years
  • Hello! I am quite new to making fan games, however I have some experience coding. Therefore I thought I would make an item as practice.
    The item in question warps the player to a pre-determined location (for instance, back home or to a secret base kind of thing) and when used again it warps the player back to the location it was originally used. (Think something along the lines of the Explorer Kit from DPP).
    It is not fleshed out much, no fancy animations or anything but it works well. For this item to function, 3 variables and 1 switch are used, of which the IDs can be edited to serve your need. The code can be found below and needs to be inserted into the PItem_ItemEffects script section.
    Any suggestions or improvements to the code are welcome!

    Spoiler:
     
    465
    Posts
    7
    Years
    • Seen May 9, 2024
    Very interesting!
    I did a script similiar for the same item infact.

    Code:
    ItemHandlers::UseFromBag.add(:EXPLORERGEAR,proc{|item|
       if $game_switches[438]==true
         next 2
         pbUndergroundExit
         $game_switches[438]=false
         next 2
       elsif $game_switches[438]==false
         next 2
         pbUndergroundEnter
         Kernel.pbTransferUnderground(235,8,8)
         $game_switches[438]=true
       end
    })

    the transferUnderground bit does all the bits you have in your script there just seperately.
    the enter and exit are just used to like the escape rope to decide where to go and no need to record it for variables.

    really like the script though, works functionally the same and way more plug-and-play than my one
     
    Back
    Top