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

[Scripting Question] Script call for using non consumable bag items

  • 9
    Posts
    3
    Years
    • Seen Dec 26, 2021
    Hi all so it's a rather strange request (and I'm not sure the title makes sense)

    I've created some outfits for my trainer and I'm trying to make an event to allow them to change. I'm aware of the script call that allows you to see what's in a trainer bag (so they can't see or change into outfits they don't own) but I'm unsure how to proceed since the items are non consumable and therefore the only options would be to view/toss etc
     

    JulyArt

    New Developer
  • 70
    Posts
    3
    Years
    • Seen Dec 17, 2021
    (broken link removed)

    Like these type of outfit? or like another type of 'outfit'.

    If I'm understanding correctly, you'd like for the option to 'change into' or 'use this item now' along side with view/toss/etc

    Alright, so here, we're looking for the 'initation' of when the player is able to view/toss and we're going to add a new option along with view/toss.

    I'm going to point you to the area of the script you'd need to mess with, looking at this area, if it contains interaction with any other area, you'll need to change those too.

    Go to script, right-click any script and choose option "find...." or use hotkey CTRL + SHIFT + F to search for # Bag mechanics

    This will lead you to PScreen_bag > Line 445

    From here, you'll add a new option. Although, I'm unsure how your scripts are set up right now. Are the outfits keyitems? Are they their own category of items (this would be cleanest I feel like) or etc.
    Depending on what your script is, you'll have to do different things to achieve the desire result, this is why I can't really assist further until you go try some stuff and come back to ask new questions.

    Upon using the item, you'd then call for the 'def' which changeplayersoutfit(desireoutfit)
     
    Last edited:
    Back
    Top