Updating variables after battle.

DyingDutchman

Warper
Member
Joined
Jul 6, 2016
Messages
1
Reaction score
0
First Language
Dutch
Primarily Uses
HI all!


I am trying to make my game work with Gameus's Quest System, and for now, it works like a charm. However, there is one problem regarding gathering quests. I got these really MMO'ey gathering quests in my game that involves getting certain loot from monsters you encounter. It is quite simple to script these events in order to work. Gameus's System however also tracks the progress of these quests in a quest log. For that to work i would have to update a certain variable after an item has been obtained in battle. That way the log always stays up to date.


Of course i can put an event in every room that continiously checks these items every tick, but that means that every time i make a new gathering quest, I will have to copy and paste this event in every map. I imagine there is a much simpler way of achieving this. Could anyone provide me with some much needed help? Thanks in advance!  :D
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
If you want to do something after each battle (like updating variables), there is a trick to have a common event run exactly once after each battle.


1) name/reserve a switch "after battle".


2) in every troop, make a troop event on turn 0 to control on that switch (you might consider looking for a script that executes troop-one-events on every troop, that way you don't have to add that troop event everywhere).


3) make a common event, set it to parallel process and condition it to the "after battle"-switch.


4) after adding whatever you want to do after each battle, the last command on that common event has to be control switch "after battle" = OFF.


Parallel processes are stopped on any screen, including the battlescreen - so the common event parallel process will not get executed during battle, even if activated on first battleturn. However, it will be executed as soon as the battle is over and the player returns to map - and since it switches itself off, it will only be executed once (no need for a lagging constant parallel everywhere)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top