I have the following:
When A battle with these guys is finished, the variable should increase to 1 or well add 1 to the existing value. that doesn't happen. ever. I am using Yanfly Engine Ace - Debug Extension v1.01 to find out whats going on. before a battle this variable is 0. after a battle this variable is 0. Nothing resets the variable unless you leave the map or the time runs out. Neither of which has happened yet.
The variable is initialized to 0 before the timer is started in an event that the player must step on. But - the player never steps on that even again so the variable is not being constantly reset.
Am I setting this wrong?
Its suppose to be, when you defeat and emerge victorious this variable increases by one.
Why is this variable not setting?
● ARCHIVED · READ-ONLY
-
-
uhm, Conditions: Don't Run
so don't expect that to run, ever. -
Ok so.....That was not helpful. how am I suppose to get the variable to increase? these are random battles.
-
You could select the Run at turn X for example, and put 0 and 0 so that it runs right at the start of the battle
but to run it at the end, there doesn't seem to exist a condition for that by default. I think there are some scripts out there that would allow you to. -
means "don't run from battle. Stay and fight"uhm, Conditions: Don't Run
so don't expect that to run, ever.
It applies only once.
you must use another condition.
I cover these stuff in my tutorial game. Here...
CLICK ME. -
That is absolutely wrong - the condition "don't run" means "do not run/execute this event" - that is why it's the default (to prevent troop events from messing up if unused) and it has absolutely nothing to do with the escape command inside the battles.means "don't run from battle. Stay and fight"
-
Yep, I used to think it meant "choose to fight" as well, but had to look into it some more for a script I was writing a while ago.
Code:So basically, if none of the condition boxes are checked (this is when it says Don't Run), it automatically returns false, saying the condition is not met.c = page.condition if !c.turn_ending && !c.turn_valid && !c.enemy_valid && !c.actor_valid && !c.switch_valid return false # Conditions not set: not executed end -
If the battle is initiated on the map, then this is really easy to do, however, I don't want to make any assumptions.
This script may help: http://www.himeworks.com/2013/05/post-battle-events/ -
Nope.Ok so.....That was not helpful. how am I suppose to get the variable to increase? these are random battles.
edit ... darn, I've just come back and read this, and can't make sense of my reply. I think what happened was that I added some code after that, along with an explanation of why it won't ever run. But for some reason, this forum SOMETIMES just "loses" a good portion of a post when code is added. I should have paid more attention when I posted and I would have seen the code and explanation had been lost. -
Back to the topic, just in case the OP still needs help.Its suppose to be, when you defeat and emerge victorious this variable increases by one.
Your first problem was that you placed the wrong condition, it would never run because of this.
Unfortunately there is no "correct" condition - the only condition that would check for an enemy defeat (Enemy HP =0%) has unfortunately a lower priority than the death check, which means that for the last enemy the battle ends BEFORE the troop event can be executed on that condition.
You need to use an indirect way to solve this problem. There are several different ways to do this, but each of them has their own advantages and disadvantages.
To select the correct way we would need some more info on why you want to increase this count.
1) Is the count only for this specific troop, or do you count the victories over all troops? If you count all, is that in the same variable or one variable per troop?
2) How do you use that variable after the battle? what should it affect?
3) Is the count for only part of the game (a quest or a map for example) or will the count be used everywhere in the entire game? -
This question has been asked numerous times, and I really don't know what all the fuss is about.
Make it run on the first turn, once only during the battle. It will increase at the start of battle. You DON'T have to wait until the last enemy is killed to increase it. If you win the battle, it will be incremented. If you lose the battle, the game will end and you'll have to reload from a save file prior to it being incremented.
The only time you would get an incorrect increment is if you allow the player to escape the battle, or if you're using some script that prevents game over when you lose a battle. If you check the "continue when loser" box (if your battles are evented) then in the When Lose condition you can decrement the variable again. -
Really? :-OThat is absolutely wrong - the condition "don't run" means "do not run/execute this event" - that is why it's the default (to prevent troop events from messing up if unused) and it has absolutely nothing to do with the escape command inside the battles.
Gee seems that I was more confused than I thought on that. Thanks for stating it. I must correct this to my game too. -
It comes from the phrase "to run a program" - in most old interpreters, you needed the "run" command to start the loaded program. It's basically a relict from pre-PC computers. Examples are the Commodore C64 and all other computers from that generation (and earlier). It was the same with several programs in earlier DOS.systems on the PC and became forgotten and unused with the first Windows-Systems on PCs.Really? :-O
Gee seems that I was more confused than I thought on that. Thanks for stating it. I must correct this to my game too. -
Yes I know the command. :pIt comes from the phrase "to run a program" - in most old interpreters, you needed the "run" command to start the loaded program. It's basically a relict from pre-PC computers. Examples are the Commodore C64 and all other computers from that generation (and earlier). It was the same with several programs in earlier DOS.systems on the PC and became forgotten and unused with the first Windows-Systems on PCs.
Had an Amiga and an Amstrad. ;)
Wow, is that the reason they did it that way? :p
Niiice! It feels now so nostalgic...
Thanks for sharing that info. -
"run" is a standard term in programming that means "execute". I'm not sure the makers of RPG Maker had those old computers in mind when they decided to call that condition "don't run". That may be the origin of the term, but the meaning is now so widespread and well understood that it's doubtful many people know or care where it came from. So probably no intentional nostalgia there, on the part of the creators ;)
-
In any case, "Run" was the programming term and not the game option.
Got it. ;)