I'm trying to get death to work like it does in the OC and MoTB (and maybe this is the SoZ system since I have it installed).
In the OC, when the PC dies, as long as there are other party members still alive, no GUI is displayed. There's no respawn and you don't have to reload. Only when the whole party is wiped out does the death gui show and you have to reload from a previous save. That's how I want it.
I opened one of the early modules from the OC - West Harbor - and I see it uses all the k_mod_scripts in the module properties. I assume this is because I have SoZ installed, so the latest scripts get used.
I copied k_mod_death and k_mod_dying to my module. It haflway works. The respawn dialog doesn't come up anymore when my main character dies - that's good. But it doesn't work all the way: my PC is shown as dead, but the NPC kept attacking. And my character got back up and started fighting, even though the picture on the right hand side showed me as dead. So clearly something is missing.
Any clues? I would think this would be pretty easy to setup.
On Death and Dying (I want it the OC way)
Débuté par
ColorsFade
, mai 24 2013 05:47
#1
Posté 24 mai 2013 - 05:47
#2
Posté 24 mai 2013 - 07:04
I have used the script below in my campaigns . I took it from the OC. Put it into your campaign folder with the name you wish and attach it to the OnPCdeath event of each module of your campaign.
// sm_pc_death, taken from OC, overrides default script nw_o0_death, same behaviour as OC.
/* Module OnDeath handler to queue KnockOut script for owned PCs*/
// BMA-OEI 12/19/05// BMA-OEI 2/28/06 -- DeathScript support
// BMA-OEI 8/10/10 -- Exit if not owned by player (e.g. possessed companions)
#include "ginc_death"
#include "ginc_debug"
void main()
{
object oDead = GetLastPlayerDied();
PrintString( "k_mod_player_death: " + GetName(oDead) + " executing OnPlayerDeath event" );
// Abort if dying character is not an owned PC
if ( GetIsOwnedByPlayer( oDead ) == FALSE )
{
PrintString( "** k_mod_player_death: " + GetName(oDead) + " not owned by a player. ABORT!" );
return;
}
// Check for additional death script string sDeathScript = GetLocalString( oDead, "DeathScript" );
if ( sDeathScript != "" ) ExecuteScript( sDeathScript, oDead );
// Queue knockout script
AssignCommand( oDead, KnockOutCreature( oDead ) );
}
// sm_pc_death, taken from OC, overrides default script nw_o0_death, same behaviour as OC.
/* Module OnDeath handler to queue KnockOut script for owned PCs*/
// BMA-OEI 12/19/05// BMA-OEI 2/28/06 -- DeathScript support
// BMA-OEI 8/10/10 -- Exit if not owned by player (e.g. possessed companions)
#include "ginc_death"
#include "ginc_debug"
void main()
{
object oDead = GetLastPlayerDied();
PrintString( "k_mod_player_death: " + GetName(oDead) + " executing OnPlayerDeath event" );
// Abort if dying character is not an owned PC
if ( GetIsOwnedByPlayer( oDead ) == FALSE )
{
PrintString( "** k_mod_player_death: " + GetName(oDead) + " not owned by a player. ABORT!" );
return;
}
// Check for additional death script string sDeathScript = GetLocalString( oDead, "DeathScript" );
if ( sDeathScript != "" ) ExecuteScript( sDeathScript, oDead );
// Queue knockout script
AssignCommand( oDead, KnockOutCreature( oDead ) );
}
Modifié par Claudius33, 24 mai 2013 - 07:59 .
#3
Posté 24 mai 2013 - 08:03
I figured it out finally.
I had copied the k_mod_death and k_mod_dying scripts from the SoZ campaign folder. That's not what you want to do, LOL.
I realized that every campaign has it's own version of k_mod_* files. So I went into the OC and grabbed those two scripts and put them in my campaign folder, overwriting the SoZ files.
It works.
Very easy. Happy.
I had copied the k_mod_death and k_mod_dying scripts from the SoZ campaign folder. That's not what you want to do, LOL.
I realized that every campaign has it's own version of k_mod_* files. So I went into the OC and grabbed those two scripts and put them in my campaign folder, overwriting the SoZ files.
It works.
Very easy. Happy.





Retour en haut







