aaronjmcd2

Veteran
Veteran
Joined
Aug 19, 2015
Messages
36
Reaction score
0
First Language
English
Primarily Uses
Hi,

I'm attempting to create a variable where every time a particular enemy--or troop would be fine--is defeated, then a variable is given +1.  How do I create that variable?  And these will be random encounters.  Thanks!
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,434
Reaction score
606
First Language
Italian
Primarily Uses
RMVXA
You can set a troop event that triggers when the enemy HP are 0 and increases the variable value. There may be a problem with the last enemy of each troop (I mean I am not sure that you can actually trigger the event if the battle ends). I have no time to test this last thing but I will do it tomorrow for sure.

If KO is allowed and the player can't escape then is much easier, you can just increase the variable value at the beginning of the fight. You only have to add the number of enemies to that variable value. If the player wins you have the right ammount, if the player loses then he gets the gameover screen and the variable is loaded from the last save.

But I promise I will test that last enemy thing as soon as possible.
 

aaronjmcd2

Veteran
Veteran
Joined
Aug 19, 2015
Messages
36
Reaction score
0
First Language
English
Primarily Uses
You can set a troop event that triggers when the enemy HP are 0 and increases the variable value. There may be a problem with the last enemy of each troop (I mean I am not sure that you can actually trigger the event if the battle ends). I have no time to test this last thing but I will do it tomorrow for sure.

If KO is allowed and the player can't escape then is much easier, you can just increase the variable value at the beginning of the fight. You only have to add the number of enemies to that variable value. If the player wins you have the right ammount, if the player loses then he gets the gameover screen and the variable is loaded from the last save.

But I promise I will test that last enemy thing as soon as possible.
Yeah, unfortunately I tested it, and it doesn't end up giving me the variables I need.  

I decided to go with your other idea, and just make these particular enemies inescapable and have the variable changed at the beginning of the fight, which is fine for now.  It's not a big enough deal for me to try to do it via code.  Thanks for the help!
 

Latest Threads

Latest Profile Posts

Have you ever had the problem of not knowing how to name your game?
I tried to draw it to keep the aspect ratio of 48*48
It doesn't look good, but I'm not sure if there are other ways to render larger characters. and then maintain the sharpness or not
SF_Enemy1_6 added!
index.php

Just thought I'd share how my battlers are looking for my 4 main characters. From left to right... Ashlyn the brave fighter, Lizzabelle the peaceful mage, Suki the thief, Saedra the not-so-peaceful mage.

pLZHVLI.png
Power to the Game Make!

Forum statistics

Threads
118,781
Messages
1,118,659
Members
155,950
Latest member
Sorcuris
Top