Help with constructing a series of events related to variables.

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses


Okay first of all, I noticed a minor error in the first event. It should say "I'll join you for /V[6] battles!" But that isn't part of the problem.

This is a set of test events to try and accomplish my idea for "Mercenary" characters.

Ideally, what will happen is you speak to "Knight M" and it rolls a random number, which becomes his "limit", i.e. how many battles he will stick around before leaving the party.

Then, at the end of each battle, it will add +1 to the "Knight M Battles" variable, and when "Knight M Battles" reaches the same number that was rolled for "Knight M Limit", the Parallel Process on the map (there is only one map where this will take place) will catch you with the event where he leaves the party.

But the problem is, it automatically runs the parallel process as soon as you start the game because both variables = 0.

What do I need to do in order to get this event to run properly?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
The parallel process should be a common event, conditioned to a switch "After battle". The last command on the parallel should be control switch "After Battle" = OFF.


Then add a command "Control switch after battle = on" to your troop event.


The parallel process will not run during battle (parallel CE are for maps only) but will start once after each battle, turning itself off after checking once (which also prevents the parallel from running sixty times per second as it would run now)
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Set the parallel process to only run if actor (the knight) exists. That should fix it.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Set the parallel process to only run if actor (the knight) exists. That should fix it.
That might prevent the PP from running everytime, but it would still create a lot of lag due to running whenever the knight is in the party - better use my solution, because then it will run only once after each battle.
 

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
Thanks, your idea worked perfectly, Andar :)
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Next time you need help with events, show the WHOLE event window, not just the bit with the commands in it. Often it's what's on the REST of the window that's important ;)
 

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,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top