Aller au contenu

Photo

Passive ability that works on-death


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
Would it be possible to make a passive ability like a "reanimate self" that checks when the PC/monster is dead and then gives a chance of rising again (based on willpower, for example)?

#2
Proleric

Proleric
  • Members
  • 2 354 messages
That should be easy. For example, here's a module script snippet for intercepting player death:

       case EVENT_TYPE_SET_GAME_MODE:
       {
         int nGameMode = GetEventInteger(ev, 0);

         if (nGameMode == GM_DEAD)
           if (condition for cheating death met)
             {
               (do stuff)
               bEventHandled = TRUE;
             }
         break;
       }

If you wanted this to happen as soon as the player or creature is hors-de-combat, you'd intercept the DEATH event in the creature script instead.

#3
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
Yes something like: 1/10 chance of being revived. I wonder if it can delayed though, like, revived in X seconds.

EDIT: I also wonder if I could make it item-dependant, either just by having it in inventory or by having it equipped, similar to Wynne's special ability linked to Aneirin's token.

Modifié par Dark_Ansem, 06 septembre 2010 - 09:51 .


#4
Proleric

Proleric
  • Members
  • 2 354 messages
You could do all of that. In the case of full party death, you probably wouldn't want a delay, otherwise the player might think they really are dead, and reload.

#5
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
or the game could force itself to reload, isn't it?