Common event on death outside battle

Status
Not open for further replies.

Nybras

Veteran
Veteran
Joined
Jul 13, 2012
Messages
36
Reaction score
0
First Language
Danish
Primarily Uses
Hi

I'm looking for a script making it possible to run a common event on actor death outside battle. Eg. death from slip damage/actor rolled over by a boulder and so on. Did a search but without luck.

I use "Yanfly Engine Ace - Death Common Events v1.01" but it seems like it only works when in battle...

Gratitude for any help :)
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Hi

I'm looking for a script making it possible to run a common event on actor death outside battle. Eg. death from slip damage/actor rolled over by a boulder and so on. Did a search but without luck.


I use "Yanfly Engine Ace - Death Common Events v1.01" but it seems like it only works when in battle...


Gratitude for any help :)
Now I cant test this currently (in school, midterns, in a study period currently, please excuse the horrid spelling ), but you shoukd be able to have a script call. The problem is that the default "everyone is dead" script may run. However, yiu may be able to make an event on the map that runs as a parallel process. That is Important, it must be a parallel process. Inside the event, make a conditional branch and go to the last page and select script. In the box, try putting


$game_party.all_dead?


And then in the next line within the conditional branch, call the common event by using "Call Common Event..." on the first page, bottom left column of the avaioable commands for an event.


This is not guaranteed to work, abd will likely fail due to the script that will check for the death of all characters. I will look into this more when I am home and able to use my computer.
 

Nybras

Veteran
Veteran
Joined
Jul 13, 2012
Messages
36
Reaction score
0
First Language
Danish
Primarily Uses
Thanks for your reply Zalerinian :)

I'm surprised that there are no scripts that will allow you to run a common event on death outside battle, I've searched everywhere xD

I've decided not to use slip damage in my game and will just focus on checking for actor death on, lets say, a trap in a chest that deals damage to the party. I do this by running a common event before damage is taken (to check if there already are dead actors in the party) and a common event after damage has been taken.

The reason for al the hassle is because when an actor dies in my game, the actor gfx changes.
 

FenixFyreX

Fire Deity
Veteran
Joined
Mar 1, 2012
Messages
434
Reaction score
310
First Language
English
Primarily Uses
Okay, try this:

DeadComEvID = 2module SceneManager class << self alias goto_when_cev_called goto def goto(scene_class) if !scene_is?(Scene_Battle) && scene_class == Scene_Gameover && !on_dead_called? && $game_party && $game_party.all_dead? on_dead if $game_party.all_dead? else goto_when_cev_called(scene_class) end end def on_dead_called? @dead_called end def dead_called=(bool) @dead_called = bool end def on_dead $game_temp.reserve_common_event(DeadComEvID) end endend
Basically what this does is calls a user specified common event whenever these conditions are met:

-Gameover scene is being called

-all party members are dead

-current scene is not the battle scene

-common event hasn't been called yet

In your "On Death" common event, you MUST end with a script call:

Code:
SceneManager.dead_called = true
Otherwise the gameover screen will never get called. The system will loop the common event.
 

Bluevvorld

Villager
Member
Joined
Nov 18, 2013
Messages
9
Reaction score
3
First Language
Danish
Primarily Uses
Hey im new on RPG Maker vx ace and i have been looking for script like this almost everywhere i've been trying to put your script and it doesn't work for me, what i basicly using is Falcao Pearl ABS, and im looking for a script or a common event that prevent gameover, if  you could help me on how to put the script and how to use it please, thanks.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Bluevvorld, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.

Please make your own topic for this problem, and remember to link the ABS script (and similiar scripts you're using) in that topic.

With an ABS-Script, none of the default methods will work, you need a solution that is specially made for that ABS.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top