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,240
Reaction score
7,619
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 Profile Posts

Just finished up building the last of my furniture! It's so nice to finally have my own place :kaoluv:


Slaving away at more maps. :LZSwink:
Accidentally zoomed the browser in on the forums page, here... and I think I'm going to just leave it. #OldPeopleProblems
Spooktober Spooktacular Game Jam Winners announcements start now! Live on stream! See who won!
so, I've begun the process of restructuring my game's base setup entirely after feeling disheartened with progress and talking to a friend. I think I'm headed in the right direction now.

Forum statistics

Threads
105,521
Messages
1,014,376
Members
137,203
Latest member
Zachmaw
Top