• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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] Call Common Event (texts) from script

  • 2
    Posts
    2
    Years
    • Seen Mar 29, 2023
    Hello.

    I'm simply testing an item to display text with choices from the script.

    The Common Event on database number 10 looks like this:

    Code:
    Text:\bWhat to do?\ch[1,3,Yes,No,(Cancel)]
    Conditional Branch Variable 001 Temp Pokemon Choice == 2
    Text:\bOkay.
    Conditional Branch Variable 001 Temp Pokemon Choice == 0
    Text:\bYes!
    Conditional Branch Variable 001 Temp Pokemon Choice == 1
    Text:\bNo..

    From what I can gather, on PokemonItemEffects it should be like this..

    Code:
    ItemHandlers::UseFromBag.add(:ITEM, proc { |item|
     next 2
    })
    
    ItemHandlers::UseInField.add(:ITEM, proc { |item|
     pbCommonEvent(10)
     next true
    })

    The game freezes if I use it from the Bag.
    If I register the item and use it with the registered key, there are no responses but I still can move, use the Bag, etc.
    What went wrong?
     
    Back
    Top