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

Help adding a modified Pokemon to the party

52
Posts
11
Years
    • Seen Aug 19, 2015
    I know I've been asking a lot of you guys lately (three questions in the past couple days DX) but please, bear with me. I can be kind of a dolt when it comes to things that I'm sure are rather simple for those who are more experienced.

    Now, to my problem.

    I am working on a Personal Opinion system for every NPC in the game, including Pokemon that appear as NPCs on the overworld. One such case, the first of many, is a Combee. Now, through interacting with these Pokemon in a number of ways, you can increase or decrease their general opinion of you, which will change the way they react to you and your presence. When you max out their positive opinion, however, they will often opt to join your party. This is not in lue of catching wild Pokemon, but in addition to it as an out-of-battle means to win the friendship of some Pokemon.

    Anywho, while working on the segment of the event for this particular Combee wherein she can join you, I am running into problems. After reading through the different wiki pages and looking for other help online via Google, I put together this segment in the event, which, unless I am mistaken, should work out the way I am wanting:

    Help adding a modified Pokemon to the party


    Now, where I'm running into issues is, when executing the event in-game, I get an error after choosing "Yes" in response to the Combee wanting to come along, and the game closes. The Error Message is as follows:

    Help adding a modified Pokemon to the party


    It is quite obvious to me that there is something I have done wrong or misunderstood. I would be very appreciative of any help that could be given here!
     
    1,224
    Posts
    10
    Years
  • The script branch and the conditional there are independent of each other to the interpreter, the "poke" variable won't carry over. You could either include the conditional branch in your script, or you could store poke to a global/game variable temporarily.

    Code:
    $game_variables[XX]=poke #XX is an integer
    
    pbAddToParty($game_variables[XX])
     
    52
    Posts
    11
    Years
    • Seen Aug 19, 2015
    So how would I go about doing it as a global variable? Take that code you've generously provided and plug it into the script segment? Will the Conditional Branch recognize that "poke" is a placeholder for a pokemon with those parameters?
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    Yes add the $game_variables[x]=poke after the ballused line, and the addPokemon script is the conditional branch.
     
    52
    Posts
    11
    Years
    • Seen Aug 19, 2015
    Thank you two very much, it went off without a hitch :3 I appreciate the fairly fast reply and simple solution.
     
    Back
    Top