I can't find a way to check if the party has died and then doing stuff other than ending the game. I've played around with IsPartyDead, GM_DEAD, and I tried to look at the script for being captured by Cauthrien, but I can't figure it out.
Playing a cutscene instead of Death Screen when the player dies
Débuté par
FergusM
, avril 30 2010 10:44
#1
Posté 30 avril 2010 - 10:44
#2
Posté 30 avril 2010 - 11:15
This code will allow you to catch the event and then do something different with it. This must be run from your module script.
[dascript]
case EVENT_TYPE_SET_GAME_MODE:
{
int nGameMode = GetEventInteger(ev, 0);
if ( nGameMode == GM_DEAD )
{
// YOUR EVENT HANDLING CODE HERE
}
}
[/dascript]
[dascript]
case EVENT_TYPE_SET_GAME_MODE:
{
int nGameMode = GetEventInteger(ev, 0);
if ( nGameMode == GM_DEAD )
{
// YOUR EVENT HANDLING CODE HERE
}
}
[/dascript]
Modifié par jsd313, 30 avril 2010 - 11:18 .
#3
Posté 30 avril 2010 - 11:26
Aha, thank you. I hadn't even considered that there would be an event for that, since there's already one for GAME_MODE_CHANGE.
#4
Posté 30 avril 2010 - 11:30
Your welcome
#5
Posté 30 avril 2010 - 11:35
Ah, actually, I am having some problems. GM_DEAD is 2, GM_COMBAT is 1. The code executes as soon as I enter combat. It appears that when the game switches to combat, nGameMode = 2, rather than 1 as would be expected. The event does not appear to have any other ints attached to it (they're just 0).
Modifié par FergusM, 30 avril 2010 - 11:36 .
#6
Posté 01 mai 2010 - 12:29
Yeah you would need to customize it a bit for your module script.
#7
Posté 01 mai 2010 - 12:32
Any pointers? I don't understand how to test that that the SET event is setting it to GM_DEAD, since the int attached to the SET event apparently isn't the game mode.
EDIT: Ah, did not see "Must be run from your module script." I'll look into that, was using the area script.
EDIT: Ah, did not see "Must be run from your module script." I'll look into that, was using the area script.
Modifié par FergusM, 01 mai 2010 - 12:41 .
#8
Posté 01 mai 2010 - 12:42
Yeah it has to be in your module script.





Retour en haut






