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

A woman gave me her number without me even asking for it. Then she left because she had other patients to see.
oh, hey, I forgot about all this!

my old project got abandoned after I started working too much on stuff I'd already worked on - plus, starting to hate the story I wrote for it. Then, well, a lot of serious life **** went down. I ended up moving across the country, cutting off some people, etc. - **** was rough.

So, uh, I guess I'm back for now? Funny how things work.
I'm glad I'm sticking to my guns on having fighting game mechanics in my game, from what I've read, it's not for everyone. but for the most part, I've made it so you don't have to use them motion inputs for attacks if you don't want to.
And my project's just entered the Lunar New Year Sale 2022... Let's see if it reaches it's goal of $ 7,77.
Ohmygoodness I played Dicey Dungeons for the first time last night. Gave me SO MANY IDEAS for how to fix Heidi.

Forum statistics

Threads
118,725
Messages
1,118,241
Members
155,873
Latest member
orchid_mantis
Top