The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: Erk64 on January 26, 2007, 09:54:48 PM

Title: Help with a battle event...
Post by: Erk64 on January 26, 2007, 09:54:48 PM
I have been working on the same battle event for are really long time now, and I still can't get it to work. Hopefully, someone will be able to help. Here is what I want to happen: If the main character (actor 1) should be KO'd in battle, he will be automatically revied with 200HP. I want to set this up so that will work during any battle, but will only work one time per battle. Unfortunately, I haven't had ANY success. Please help...my demo expires in just a few days...

Oh, and if you can, please try to help me using the commands and NOT the sripting program.
Title: Re: Help with a battle event...
Post by: :) on January 26, 2007, 11:54:31 PM
I will wack around at this for you.
Title: Re: Help with a battle event...
Post by: Snailer on January 26, 2007, 11:57:00 PM
Whacks together with nouman !
Title: Re: Help with a battle event...
Post by: Lominisio on January 27, 2007, 12:00:45 AM
Watch as the awsome Lominisio posts a pic that the even more awsome Blizzard posted!!

This will make them revive with 1 HP at the end of each battle. You can edit it to suit your needs.

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi67.photobucket.com%2Falbums%2Fh316%2Fbblizzard%2FScreenies%2F1hp_after_death.png&hash=eb4269634493094ab084e1fd35d609174595a503)
Title: Re: Help with a battle event...
Post by: :) on January 27, 2007, 12:09:32 AM
not what he wants...he wants him back alive IN battle.
Title: Re: Help with a battle event...
Post by: Snailer on January 27, 2007, 12:47:16 AM
Use common event conditional branch..
Title: Re: Help with a battle event...
Post by: :) on January 27, 2007, 12:56:29 AM
that wont work..we need a state to take a person out of the state of knocked out.
Title: Re: Help with a battle event...
Post by: :) on January 27, 2007, 01:52:36 AM
here you go...

also the main person right now that I am assuming you is your main hero is called aluxes.

go into states in databse, and make a new one called REVIVE..
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg253.imageshack.us%2Fimg253%2F3176%2Fstateio1.png&hash=2717a2664b7d59e2cbedb2ff9db657f767e4c9a4)

then, go to troops. Select which troops you want this to work with.
then set this up under the events:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg246.imageshack.us%2Fimg246%2F7126%2Ftroopska3.png&hash=08bf6177649474116c6e96c9d6eb52735aeca1d8)
i used + 50, you can make it +200 if you want, also to make it happen once, at the end add (erase event) and it should work out.
Title: Re: Help with a battle event...
Post by: Erk64 on January 27, 2007, 02:16:54 AM
I want to thank everyone for looking into this. But, I was finally able to find a way to make it work. I'll explain how I did it in case anyone is interested. In order to create an automatic revive technique, you will have to build the skill under the Troops tab. The only downside to this is that you will have to copy and paste it into each troop if you want your character to be able to do this in any battle. Anyway, you start by looking at the battle event section of this tab, and set your first page with the following:

Condition: Turn 0
Span: Battle

Now, you create the first event, which will be to turn on a switch, which you can name whatever you wich. I named mine "revive". When you are done, it should similar to this:

@>Control Switches: [0001: revive]=ON

Basically, this prepares your Reviving skill for activation, but it will not initiate it on its own. Next, you are going to create a new event page by clicking on the NEW EVENT PAGE button. Set this new page to the following condition and span:

Condition: Turn 1X & Switch: [0001: revive] is ON
Span: Turn

In other words, this is saying that your skill will activate once per turn as long as the revive switch is ON. But wait a minute, you say, what about making the skill so that you could only use it once per battle? It can be done! It's quite simple, really. All you have to do is add a conditional branch that states which character must be KO'd for the event to activate. So, even though it "activates" every turn by default, nothing will happen unless the designated character has been knocked out. You can customize your event page to add sounds or animations if you like. For instance, this is what mine looks like:

@>Conditional Branch: [Aaron] is [Knocked Out] inflicted
 @>Text: Spontaneous Recovery---Activated!
 @>Change State: [Aaron], -[Knocked Out]
 @>Show Battle Animation: Actor No.1 [Raise 2]
 @>Change HP: [Aaron] +199
 @>Change Switches: [0001: revive]=OFF

Here's what's happening. The conditional branch tells the skill to activate. It will do so before you and the enemy start trading attacks, but after you choose your moves for your party members. The text command (or Message Command) displays the name of the skill. By default, it will appear at the top of the screen. This is there to tell the player what's going on. Use the Change State command to remove the state "Knocked Out" (or whatever your equivlent is) from your target character, or, if you choose, your whole party. Just be sure you are consistant with what you put in the Conditonal Branch command. By removing knockout, you will automatically be placed at 1HP. To raise this to the desired amount (in my case, 200) use the Change HP command. Finally, be sure to turn off the switch, thereby preventing its further use in this battle.

And so, that's how it's done. If anyone else figures out another way to do it, I'd love to hear about it. There are two downsides to this method: (1) You have to edit them throught the Troops tab, and not as actual skills, and (2) Your character will not be revived if he/she is the only party member, and/or the last one to be KO'd. These are minor setbacks, in my opinion, and I am willing to deal with them. Once again, thanks to everyone who helped out!
Title: Re: Help with a battle event...
Post by: Erk64 on January 27, 2007, 02:18:33 AM
Thanks, Nouman! That's a really good idea! I may end up using your method after all...
Title: Re: Help with a battle event...
Post by: :) on January 27, 2007, 02:22:24 AM
lol, no problem  ;D , I had hoped you trusted me to find the answer, but nice job trying yourself. And yes my way is a really easy way to do it.
Title: Re: Help with a battle event...
Post by: Erk64 on January 27, 2007, 02:46:20 AM
I tried out your method, and it works...sort of. The problem occurs when the revived character dies again. Their HP drops to zero and their battler vanishes from the screen. However, they are not exactly, "dead." They can still attack and everything. It's rather confusing. I can't figure out how to prevent it.
Title: Re: Help with a battle event...
Post by: :) on January 27, 2007, 02:51:50 AM
ooo..I guess I haven't fully tested it  :D , I will see whats wrong and try to fix it. I think all thats need it to have it take the player off the revive state after +200 health..but I wont know since I have to try later (busy) but you can try that and tell results.