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

[RESOLVED]Leaving a party Pok?mon in the overworld until picked up

53
Posts
8
Years
  • [RESOLVED]Leaving a party Pokémon in the overworld until picked up

    Ok, so I'm working on a scenario, where the player is asked to leave one of his Pokémon on a spot until a later time when he picks it up again.

    The main problem for me is, how do I make the sprite of the choosen Pokémon appear on that spot and be there until the Pokémon is picked up by the player again?
    I was looking through the "Following Pokémon Script" in hopes of finding something useful there. I bet the answer is there somewhere, but I can't find it. Either the player ends up with 2 Pokémon following him or I get errors :(

    Can someone enlighten me, please?

    Thank you very much :)
     
    Last edited:

    Alababal

    Pokémon Alabaster Developer
    101
    Posts
    9
    Years
  • I'll try to start you off since I have a similar script on hand. I put in the what you see below and it worked for me.

    [RESOLVED]Leaving a party Pok?mon in the overworld until picked up


    You would probably have to put the values in global variables/switches so that it will remember it when you leave the map. So instead of

    Number=sprintf("%03d",ref)

    you might have

    $game_variables[99]=sprintf("%03d",ref)

    Also that script automatically chooses the first pokemon in your party, so if you wanted to choose a different one you'd have to tweak that as well. Hope this helps!
     
    53
    Posts
    8
    Years
  • Thank you very kindly, Alababal. The sprite appears as intended :)

    I have worked on this the whole day and even tried to make my own script (working with different other scripts that already are in the program like daycare and bug catching contest), but as it would seem, scripting is not that easy, when you don't know the language...
    Two problems arose, which I seem to be unable to resolve by myself, unfortunately.

    1. I stored the Pokémon in the Variable #40, which also shows in the debug mode where Variable #40 shows the number of the Pokemon. This number is even then shown, when I leave the place. Though the sprite disappears when I leave. How do I keep the sprite?
    2. Removing the Pokémon is easy enough, but appearantely returning it is not as simple. How do I get the Pokémon back? The only thing I get back are errors :(
      I simply tried to get it back via
      $Trainer.party[$Trainer.party.length]=$game_variables[40]
      $game_variables[40]=nil
    Maybe this helps a little:
    [RESOLVED]Leaving a party Pok?mon in the overworld until picked up

    I really appreciate every kind of help and I'm sorry for my incompetence in this kind of thing, but it's really not as simple as it appears :(
     
    Last edited:
    772
    Posts
    13
    Years
    • UK
    • Seen May 7, 2024
    try

    poke = pbGet(xxx)
    pbAddPokemon(poke)

    where xxx is the variable number, thats how i do it
     
    53
    Posts
    8
    Years
  • Thank you, desbrina. Unfortunately it doesn't work.
    Either I get this error:
    [RESOLVED]Leaving a party Pok?mon in the overworld until picked up

    Or, if I do it without the ".species" part, I get an error about "undefined method species for 0:Fixnum". Any clue what I'm missing?
     
    53
    Posts
    8
    Years
  • I posted that script part in the picture earlier on.

    Here in text format, so that it is easier to read (the picture doesn't show everything, since some parts are too long):
    poke=pbGetPokemon(1)
    $game_variables[40]=poke
    $game_variables[40]=sprintf("%03d",$game_variables[40].species)
    form=poke.form.to_s
    shiny="_"
    shiny="s_" if poke.isShiny?
    pbMoveRoute($game_map.events[152],[PBMoveRoute::Graphic,$game_variables[40]+shiny+form,0,2,0])
    $Trainer.party-=[poke]
    $Trainer.party.compact!
    Edit:
    Haha, my bad. I solved it. Thank you for your help
    [RESOLVED]Leaving a party Pok?mon in the overworld until picked up


    I stored the Pokémon Graphic in the same variable as the Pokémon itself, of course it won't come back in the team, the game tried to load the graphic, which, of course, failed.

    I also solved the issue with keeping the sprite. I have another event somewhere on the same map on parallel process that checks whether a Pokémon is waiting for you or not and if so, automatically loads the respective sprite.

    Sprite Updater
    [RESOLVED]Leaving a party Pok?mon in the overworld until picked up

    Waiting Pokémon Event
    [RESOLVED]Leaving a party Pok?mon in the overworld until picked up[RESOLVED]Leaving a party Pok?mon in the overworld until picked up

    I am sure there is a more "professional" way to do this, but it works.

    Thank you very much for help =)
     
    Last edited:
    Back
    Top