Actors return to recruit location after defeat?

Joined
May 11, 2019
Messages
12
Reaction score
3
First Language
English
Primarily Uses
RMMV
I've been replaying It's Our Revolution by Wood Penguin, and I really like the idea of having party members leave when defeated, and you having to go find the place you first recruited them to have them join you again.

Unfortunately, I have no experience with Javascript beyond the stuff I've found on the RMMV Script Calls sheet. What I was thinking of potentially doing was this:

1. When Actors get Knocked Out in a battle, have their IDs added to a variable as an Array.
2. After a battle is complete, put that array into $gameParty.removeActor().

I just don't know how to put that code together.

I also need to make Actors show up back at their original position for recruitment again. I was planning on using Common Events like so:

If: Script: $gameActors.actor(7).isDead()
Script: var key [5, 27, A]
$gameSelfSwitches.setValue(key, false)

And then repeating that for every possible Actor. Is there a more succinct way of writing this, or is this the best way to set this up without needing to make a Plugin Request?
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
485
Reaction score
190
First Language
thai
Primarily Uses
RMMV
um... did you had try it with normal event+script call?
you don't need self switch for this I think
switch for actor - who ever
enable when he dead(knockout) to show his page when recruiting again
it the basic that rpg maker already handle

and you can check knockout state by normal condition branch
then remove that actor from party
I don't think you need plugin at all
you just need to check basic of your editor knowledge more
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,009
Reaction score
7,019
First Language
German
Primarily Uses
RMMV
you don't even need scripts.

the events pretending to be the actors to hire need three event pages.
First page without conditions is the page where the actor is not yet hired
Second page is conditioned with a switch "hired xy" for the case after they hired and left, waiting to be picked up again
Third page has no sprite and no content, is conditioned to "actor exits (= is in party)". This will make sure that the event vanishes while the actor is alive and in the party.

Then you make a parallel process common event triggered by a switch "after battle" to check all actors if they are dead. If yes, heal and remove from party. at the end of the event switch off the switch that triggered it.

last step: in every troop, make a troop event that turns on the after battle switch as soon as the battle is started. Because parallel processes can't work in battlescreen, the switch will trigger the common event directly after finishing battle.
 
Joined
May 11, 2019
Messages
12
Reaction score
3
First Language
English
Primarily Uses
RMMV
Oh... whoops. I didn't put together that parallel processes would still work if they activate during a battle.

Sorry, I guess I got wrapped up in the idea that this was a really complicated thing to do that I just assumed it would need scripts.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Ahh, end of the day stinky feet, fresh out of the boots. Smells like a job well done. Seriously, I have to rinse my feet when I get home, or it's not fair to my wife.
Stream will be live shortly with some pixel art! Feel free to drop by!

Can't believe I forgot to put an image of my drawing pad! It looks kinda like this, maybe I'll get a better pic tomorrow...
Backup tip: If you don't want to back up your whole project every day, at least back up everything *except* your Image and Audio folders, which you can do weekly/as needed/etc.
The final version of our game is already available both in English and Spanish! ^___^
Can't believe this day has finally come... T_T

Forum statistics

Threads
97,829
Messages
947,197
Members
129,039
Latest member
elskampo
Top