Always running event

I'm using Yanfly More currencies plugin and I am trying to set up a system with 3 different currencies to go above the 999,999 cost limit of the engine.


My problem is I don't know how to set up an event that constantly checks your cash. what I want is that when the character gets to 999 of a certain currency for the game to take that amount away and turn it into the other.


For example: if player has 999 gold and earns one more gold coin it turns it into 1 emerald coin than when you have 999 emerald coins and get 1 more it turns it into 1 ruby coin, and repeats.
The easiest way to go about this is to make a common event, which can be set up in the database. Make sure to set the common event to parallel process so it will always be running  in the background (don't choose autorun, as that will freeze all other events while it runs). A common event needs a switch to start running, but you can just have that switch activate in the starting cutscene.


From there, just set up a conditional branch to check if you have 1000 gold or more, and if so, make the player loose 1000 gold, and gain 1 ruby. 


One thing to note, parallel processes can cause lag if you have it constantly checking for things. An easy way to help relieve this is to set a wait command after each failed check. 30 or 60 frames should be fine (which means the event would activate at most half a second, to one second after you reach 1000+ gold.
Thank you, this worked. I tried it with autorun but it would just freeze my game, now its working perfectly. Again thanks for your time 🙂
Autorun is meant to freeze your game.  It stops the player from doing anything while a cutscene plays out.  You NEVER want to create a never-ending autorun event.


tbh I'd just get a plugin that does the adjustment every time gold is changed - either via the Change Gold event command or via the Shop window.  That way you don't need to have an event running constantly checking for something that's going to happen fairly infrequently.  

Original thread: https://forums.rpgmakerweb.com/threads/always-running-event.69374/