Author Topic: After Death Hench Conversation-  (Read 330 times)

Legacy_Omega27

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: +0/-0
After Death Hench Conversation-
« on: July 18, 2012, 06:12:49 pm »


                So everything with my mod and henchmen works about fine up until the convesation tree comes into play.

So originally most of my obtained henchmen in my mod are all part of the plot story. So they have their plot conversation, and then the rest. Where i can change their tactics and etc.

For the most part everything seems to fire correctly, like when i remove the henchmen from the party and speak to them again, the correct conversation fires to re-add them. When it comes to the case of them dying and after bringing them back and speaking with them. Things dont seem to go so well.
I will post the conversations in the orders i have them for one of the players.

-Yes,what could i do for you?
(is the first conversation in the list, that fires when the Hench speaks to the player)

-"The Astralis games are cruel, but i have returned"
(This is the on death conversation that i have, while using the following script)
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------

#include "nw_i0_henchman"
int StartingConditional(){    int iResult;
    iResult = GetWorkingForPlayer(GetPCSpeaker()) == TRUE &&        GetDidDie() == TRUE;;    return iResult;}-------------------------------------------------------------------------------------------------"Hello, would you like to join up again?"
(Using this as my re-group conversation, seems to work fine)

-"What is it?"
(This one is the conversation that fires with the plot)
-"Hello Stranger"
(Plotless Greeting, that never seems to fire)
-"I believe you should be speaking to my father"
(The buged part, where the player misses something in the plot-line)


So can anyone help me out with this one i'd appreciate it big time
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
After Death Hench Conversation-
« Reply #1 on: July 18, 2012, 11:17:18 pm »


               Does GetWorkingForPlayer check to see if they have worked for them, or are currently a henchman?  It seems looking at it like that's going to return FALSE any time the GetDidDie would return TRUE, and vice versa, in any situation.

Edit:  Okay, I looked at the include, and that's just a variable switch for both.  It looks like GetDidDie can only be checked once though, since it resets itself the moment the check is made.  Are you checking it somewhere else before the conversation starts?

int GetDidDie()
{
   int oDied = GetLocalInt(OBJECT_SELF, "NW_L_HEN_I_DIED");
   if (oDied == 1)
   {
       SetLocalInt(OBJECT_SELF,  "NW_L_HEN_I_DIED", 0);
       return TRUE;
   }
   return FALSE;
}


               
               

               


                     Modifié par Failed.Bard, 18 juillet 2012 - 10:21 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
After Death Hench Conversation-
« Reply #2 on: July 19, 2012, 04:38:19 am »


               I think the GetDidDie function is a safeguard on the OnDeath script only firing once.  So it may clear itself in the death script in cases where a double hit happens that kills the NPC.   It does however have to be cleared by the time the NPC is raised, If it is not the OnDeath event will not fire correctly when they die again. 
At least that is the way I think it works.   If it is not,  I may have introduced this bug by addjustments I made to a OnDeath script someone posted.  
Hmm Let me see if I can find that link.

Help with a henchman respawn script?


So it is had to tell why your script is not working correctly without knowing where else you are using that function.  In the deathscript above It looked like he was using an enitirely differant var for a conversation starting condition. 
               
               

               
            

Legacy_Omega27

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: +0/-0
After Death Hench Conversation-
« Reply #3 on: July 20, 2012, 10:56:23 am »


               Actually guys thanks, i think i found some sort of loop hole in the branch line. The conversation i use to re-add a hench after you have willingly removed them. Now appears after raising them. For now i believe this will work.

I didnt take in consideration the hench OnDeath script that is def from one of the expansions.