In my game there exists the main character and a chosen partner that plays a support role in battle. I want to set it so that if the main character dies the battle ends and either resumes the game or causes a game over I'm not sure which yet. Is there a function like that or do I need some kind of special script for it. Any help would be greatly appreciated. Thanks in advance.
Is there a way to set it so if a certain character dies you get game over?
RPG Maker VXAce SupportI believe there was a script for that...
You can do this with common events and simply setting it so that if main character has status of "dead", the game immediately results in a gameover. You can do this by setting a Conditional Branch that is the player has the state inflicted of "Death" upon them. Then, just have the "call game over screen" under the condition. Using this same method, you can also set it up so that instead of "call game over screen", you simply set it to "Abort Battle" or what-have-you. Fairly easily accomplished and takes little more than ten seconds to actually set it up.
Why does everyone insist on a script to do everything? There's a lot you can accomplish with this program without ever once using a script...
Why does everyone insist on a script to do everything? There's a lot you can accomplish with this program without ever once using a script...
because it was a quick response... see how I even didn't get the chance to find a link for the script? 🙂
yeah... unless he wants to copy-paste this as a troop event... for all troops... which is more tedious than writing a script that runs maybe after damage and checks if the main actor died...
Thanks guys I got it working. One more odd question though as I can't seem to find it is there an event command that lets me change an actor's face graphic?
it's "Change Actor Graphic" on the last page
Well I feel dumb. Thanks for the help.
You can set it as "auto-run" and have the trigger be a simple switch or variable activating upon the character having the "Dead" state. That does make it work. Also, it does work in a parallel process if the command is "Abort Battle". If it didn't work, there'd be absolutely no reason for the "abort battle" command to exist in the Event Commands window, unless you're going to try to assert that the programmers of VX Ace are absolute morons.
and once again you post something without testing it.
AFAIK, the abort battle works if you use it on troop events...
I think the in-battle related events were created to be used for the troop events and not the map or the common events...
Also, about the auto-run thing... Even if it works, you still need another event to capture the time that the unit dies... now you can do that via troop events that you would copy-paste into other troops (or just copy-paste the troop itself)... but then, why would I make a CE anymore? I can just make the troop event call the game over screen by itself...
so hmmm yeah... you can always just have a troop event for all troops that runs when Actor's HP becomes 0% if that condition suffices... so, here you use TE, not a parallel process or auto-run CE...
I think the in-battle related events were created to be used for the troop events and not the map or the common events...
Also, about the auto-run thing... Even if it works, you still need another event to capture the time that the unit dies... now you can do that via troop events that you would copy-paste into other troops (or just copy-paste the troop itself)... but then, why would I make a CE anymore? I can just make the troop event call the game over screen by itself...
so hmmm yeah... you can always just have a troop event for all troops that runs when Actor's HP becomes 0% if that condition suffices... so, here you use TE, not a parallel process or auto-run CE...
most likely as there is nothing that checks whether there are autorun/parallel process triggers for events during any scene other than map.
Without testing it? Yeah, of course I did. I have no use for a system that auto-game-overs with the death of a single teammate. Creating everything necessary to actually test it is kind of a pain in the butt at the moment. I (apparently incorrectly) assumed the programmers of VX Ace knew what they were doing when they created the program and allowed Common Events to run all the time if they were linked to a variable. Even if that variable was in battle. I also assumed they wouldn't let you use the "Battle Commands" on the world map, because that would just be silly to not disable those things where you couldn't use them. I could see the inclusion of them on the Troop Screens and the exclusion of them on the Map screens. But, since someone forgot to exclude them where they don't work, I mistakenly thought they would work in a Common Event (which would actually make sense for why they were included with the map event commands).
But, a cursory glance through the Help Files of the program does indeed say that these commands only work from the Troop Tab of the database and only in battle. It says zippo about common events not working there, but I'll assume you know what you're talking about on the subject, especially since all variables save for one or two are all tracked outside of battle (namely enemy HP and player HP).
Though, depending on the system this guy is using, ending a battle with the character at 0 HP or in the "dead" state would yield the Game Over screen just fine while also allowing the other characters a chance to revive or heal the character. Otherwise, it might be unnecessarily frustrating to players when all the monsters suddenly lay a beating on the character who can't be allowed to slip into 0 HP. Just depends on what exact effect the person wants. That's just my two cents though.
just use the troop events... it's easier and you can catch 0% HP... XD
Found this by Tsukihime
http://himeworks.wordpress.com/2013/04/13/global-common-events/
It lets autorun/parallel process triggers to run in other scenes.
http://himeworks.wordpress.com/2013/04/13/global-common-events/
It lets autorun/parallel process triggers to run in other scenes.
I don't really recommend parallel processing here, since there are only specific times that you need check if the character dies... You won't check if a character dies at battle start, probably not at turn end, things like that... you'd probably only need to check upon damage/skill (action or slip damage)... so just use troop events maybe...
personally i would just alias the die method and abort/gameover it directly.
Code:
class Game_Battler < Game_BattlerBase alias main_die die def die main_die #BattleManager.abort if actor? && id == 1 SceneManager.goto(Scene_Gameover) if actor? && id == 1 #One or the other. end end
yeah, the fastest and easiest method... and I think also the one that is fired the least... so less performance impacts...
I really don't know why people shy away from scripts or think that you only use scripts if you cannot do it via events or only for complex things etc...
I really don't know why people shy away from scripts or think that you only use scripts if you cannot do it via events or only for complex things etc...
I don't mind a script if it does something outside the bounds of the actual program. Or, if the script actually simplifies something that is currently incredibly complicated and time consuming to implement. But, most people suggest scripts for just about anything, so I tend to shy away from them. "How do I get text up on the screen?" "Use this script!" "How do I change out my party members?" "Use this script!" "How do I make an item that doubles the amount of gold I get after battle?" "There's this handy script for that!"
Frankly, I think if you can do something in the program and do it with relative ease, you shouldn't need a script for it. Especially since using a script for a lot of rather basic things tends to stunt creativity and tends to also create unfamiliarity with the program at large. After all, why learn how to do anything creatively or even learn just how each thing in the program works when you can bypass it with a script and have it do all the work for you? That isn't to say a script couldn't do some things better than a person could execute them in a game, it's just to say that people should really only suggest using a script when it's needed or requested. Besides, you won't get the most out of a script anyway, unless you do actually know the program fairly well to begin with.
I, personally, have plans to use at least two scripts in my game. One of them streamlines a process I could do myself and makes it relatively simple (as well as look far better) and the other does something the program itself doesn't do. I have an achievement script and a script that shows all the stat buffs/debuffs on an item so I can use my item descriptions for flavor text instead of effect details. Scripts are insanely useful, especially when used correctly. I just don't believe every answer should be "use a script" when it can be done just as effectively without one.
Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-set-it-so-if-a-certain-character-dies-you-get-game-over.18392/