Sykes

Villager
Member
Joined
Sep 20, 2016
Messages
6
Reaction score
0
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
614
Reaction score
204
First Language
English
Primarily Uses
RMMV
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.
 

Sykes

Villager
Member
Joined
Sep 20, 2016
Messages
6
Reaction score
0
First Language
English
Primarily Uses
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 :)
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,215
Reaction score
14,248
First Language
English
Primarily Uses
RMMV
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.  
 

Latest Threads

Latest Posts

Latest Profile Posts

Going live at 2pm EST
Today is the day! I will be productive in game dev work! I will - *gets distracted by cat playing with her toy mouse* Awww <3
Whelp. I tried to be productive.
Decided to work on Fandom Scouts today. I've decided that instead of using the generic "scrolling text" event that MV has (I'm using MV for FS, not MZ) I'll use the movie option. I'm still trying to find a way to get Premiere Pro to output the compatible format though. If anyone can give me some help, it would be greatly appreciated!
Barthdry wrote on tln143's profile.
Hello tln143 Welcome to the RPG Maker Forum. We wish you enjoy and make good rpg games
Barthdry wrote on 00cassiesmells's profile.
Hello 00casiemells Welcome to the RPG Maker Forum. We wish you enjoy and make good rpg games

Forum statistics

Threads
109,037
Messages
1,041,518
Members
141,523
Latest member
Zereitzu
Top