Variable Troubles

frustratedlad

Villager
Member
Joined
Mar 1, 2014
Messages
8
Reaction score
0
First Language
English
Primarily Uses
RMMV
I have a quest where the player needs to kill 10 slimes and 5 rats. So I set up two variables one for slimes and one for rats. I've seen another thread where they said you can't make it dependent on if the enemy dies, so I put in the troop tab to increase the variable by a specific number at the start of the battle. The problem is that the variables don't seem to be changing. I use a yanfly plugin to debug, so I can see that the variables aren't changing.
 

DarkHyudrA

Actually I'm Enzonaki
Veteran
Joined
Jan 8, 2016
Messages
40
Reaction score
19
First Language
Portuguese
Primarily Uses
RMMV
And how you did the troop eventing to change the variable?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
then show us screenshots of the troop events to check what you mighthave done wrong.
Did you set the condition correctly? "don't run" means "never execute" as it comes from the phrase "to run a program", it has absolutely nothing to do with escaping.

Which means that if you do it this way and correctly, the variable will increase even if the enemies are not killed.
 

frustratedlad

Villager
Member
Joined
Mar 1, 2014
Messages
8
Reaction score
0
First Language
English
Primarily Uses
RMMV
then show us screenshots of the troop events to check what you mighthave done wrong.
Did you set the condition correctly? "don't run" means "never execute" as it comes from the phrase "to run a program", it has absolutely nothing to do with escaping.

Which means that if you do it this way and correctly, the variable will increase even if the enemies are not killed.
oh ok, I see. I thought it just meant that the player doesn't run from the battle :/. thanks for explaining that, that makes a lot more sense
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
The way I did it for my project was like this:

1) Use Chronosv2's Death Common Event plugin so that a certain common event runs whenever an enemy dies.

2) Make a conditional branch that checks if the sidequest switch is on and inside that branch have the variable add one. Now when the enemy is killed, the common event will run, check if the sidequest switch is on and add to the variable.
 

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,049
Members
137,569
Latest member
Shtelsky
Top