Timed treasure chests/loot?

● ARCHIVED · READ-ONLY
Started by AsuranFish 6 posts View original ↗
  1. Hi all, I'm trying to figure out how to best implement this idea. I basically want to make treasure chests that appear after triggering an event, but only last for a certain amount of time.

    I know how to make a typical treasure chest, and I know how to make an event disappear after a certain amount of time by running it as a parallel process, using "wait" commands, and then changing the event as necessary. But since one requires "action key" and the other requires "parallel processing", I don't know how to make a chest that can be opened, but will disappear if ignored long enough. Think similar to hearts and rupees in Legend of Zelda...

    Any help would be greatly appreciated!
  2. You can use my Multi Timers plugin for that:

    https://forums.rpgmakerweb.com/index.php?threads/multi-timers.50474/

    Parallel processes aren't good for making events disappear after a certain amount of time, as having several of them running at once causes lag, and if you have them as map events rather than common events, they don't run when you go to another map, and when you return to the map that has them, they start over.

    So create your treasure chest, condition the first page by self switch B (because a chest quick event uses self switch A by default)

    When you trigger the event that causes the treasure chest to appear, instead of turning on a switch, turn on the chest event's self switch B - you can either do that via a script call, use the Outer Self Switches plugin to do it, or a plugin call to my multi-timers plugin, passing through 1/60 as the number of seconds (you could even try 0) to make it appear immediately. Follow that by a plugin call to turn off the chest event's self switch B after the required number of seconds.

    Chest will appear when you activate the event, and disappear the required number of seconds later. If you also want it to disappear when the player opens the chest, just turn off self switch B instead of turning on self switch A.
  3. Thanks, I think that sounds like it will work for what I need, although I won't be needing quick chest events for this... It's for a sort of enemy encounter system where...

    Default: Enemy ready to be engaged/aggro
    A: Enemy is dead, respawning (currently have this set to Wait ~2000)
    B: After being killed, enemy has a chance of dropping a chest.... chance to trigger self-switch B - chest should despawn and switch event to (A) if ignored
    C: Enemy has just respawned, won't aggro right away (to avoid irritating respawn and instant aggro, gives the player a chance to move)
    D: Enemy is aggressive and pursuing the player...

    So the possible cycles of an enemy event are:
    Common: Default > D > A > C > Default
    Rare: Default > D > B > A > C > Default
  4. Just make sure, if it's the same event for the enemy and the chest, that when you 'reset' it, you turn ALL the self switches off. Otherwise next time it triggers, one of them might still be on from the previous time and might cause it to skip part of the process.
  5. Ohohoh I have a simpler method!! You can just make a global switch A, make a parallel event so that the switch turns off after being turned on a certain time.

    Then, make a chest event witha blank page 1 (a timeout-ed chest) , then page 2 (action button, open chest get item) with criteria switch A turned on

    This way, there's a parallel timer controlling the time span of the chest while making the chest independent! :D
  6. Did you see my comments about parallel processes? And this would require a global switch and a parallel process for every such chest.