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

[Eventing Question] Spending Ticket-Items via script choices? How do I get vending machines to exchange tickets for your choice from a set of 6 Pokemon?

  • 428
    Posts
    5
    Years
    I have coded a PokeTicket item, it's expensive and it goes in the item pocket when bought. I've got the Vending Machines looking right, but how do I script them?

    My goal is to create a vending machine for Pokemon, with six different Pokemon available. It will give you a choice of those six, and then trade one of your PokeTickets for a Pokeball containing your chosen Pokemon. It should also let you cancel and walk away after showing you what's on offer. And if you lack any PokeTickets, you are told to come back when you have more PokeTickets.

    I know how to add Pokemon to the player via script, but how do I program this "Pokemon for PokeTicket" transaction?
     
    You don't need to script this. It can be an event.
     
    You need to erase the item(ticket) and give the pokémon after it.
     
    pbHasItem?(item) to check, and pbDeleteItem(item,qty) to delete the ticket.
     
    Back
    Top