• 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] RNG and In-Field Animations

B+

  • 32
    Posts
    4
    Years
    • Seen Feb 18, 2025
    Hi,

    My two questions are as follows:

    1. Is there a way to RNG a list of items through an event / script call? Say a player searches a trashcan. Upon searching, they'd then be rewarded with an item that would come from a list of potential items. I've found def rand, but I'm not sure what would be the next step if that is the key.

    2. Is there a way to make animations loop on the map? Right now, a simple Show Animation event plays all of the animation frames once, and then disappears. Setting an event that calls the Show Animation event as a parallel process shows all frames of the animation at once. I checked the essentials wiki for field animations, however the page didn't exist. I tried to Loop a Show Animation event, but that ultimately freezes the game. Sorry, I thought the obvious math would work lol.

    For this, I don't mean animating the spritesheet graphic of an event, but an actual animation stored in the Database.

    Thanks in advance!
     
    1. Through an event you can use the 'Control Variable' command, and configure it to be a random variable. Afterwards, you can set up a conditional branch (basically an else-if statement) which will check the variable, and if it is equal to a certain value, it gives you the item connected to that variable.

    I wouldn't bother trying to set this up through scripts, an event should be fine enough.


    2. For this you may want to try a fog animation. You can read more about fogs here, and decide if this is something you're looking for: (broken link removed)
     
    1. Through an event you can use the 'Control Variable' command, and configure it to be a random variable. Afterwards, you can set up a conditional branch (basically an else-if statement) which will check the variable, and if it is equal to a certain value, it gives you the item connected to that variable.

    So how would I assign an variable to an item? I couldn't figure it out.
     
    So how would I assign an variable to an item? I couldn't figure it out.

    [PokeCommunity.com] RNG and In-Field Animations


    Here's how I would set it up. On the first event page, you use the Control Variable, followed by the conditional branches. You then call the script to give the item, based on the value of the variable. The number of options can be increased or decreased by changing the possible number yield, and the items can for sure be changed as well.

    The second event page is blank, except for the condition 'Self Switch A is on'

    Hope this helps
     
    [PokeCommunity.com] RNG and In-Field Animations


    Here's how I would set it up. On the first event page, you use the Control Variable, followed by the conditional branches. You then call the script to give the item, based on the value of the variable. The number of options can be increased or decreased by changing the possible number yield, and the items can for sure be changed as well.

    The second event page is blank, except for the condition 'Self Switch A is on'

    Hope this helps

    You're a life saver!

    Although, the Kernal. portion wasn't needed, as that always resulted in an error. But seriously, you've just expanded my creativity. You will not be forgotten.

    Thank you.
     
    Back
    Top