Aller au contenu

Photo

Henchmen hire/fire


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

#1
Rowwena

Rowwena
  • Members
  • 33 messages
Hi,

Sorry if this has been answered before. Is there a way to disable the ability to remove a henchman via the radial menu? I would like to set it up so the only way to remove the henchmen in the module would be through the you're fired conversation.

Thanks

#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
I am not sure what script sets you are using for your henchman. Or would I know the differance for that matter( I do not mess with henchman that much).

The command for then to leave most likely comes form the OnConversation event. Mostlikel from a call to the function bkRespondToHenchmenShout(oShouter, nMatch, oIntruder, TRUE);

You can find where that function is defined in x0_inc_henai. find the line that reads:
case ASSOCIATE_COMMAND_LEAVEPARTY:

That is most likely the code you need to change for the results you want.

#3
Rowwena

Rowwena
  • Members
  • 33 messages
I went in a commented out that whole section but it did not seem to work as I could still remove the henchman from the party. Not a big deal, I will just have to make the disclaimer that if anyone uses that method they will break some quests that require the henchman.

#4
Failed.Bard

Failed.Bard
  • Members
  • 774 messages

Rowwena wrote...

I went in a commented out that whole section but it did not seem to work as I could still remove the henchman from the party. Not a big deal, I will just have to make the disclaimer that if anyone uses that method they will break some quests that require the henchman.


A quick question.  Since that script is likely in an include file, did you build the module before testing?

#5
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

Rowwena wrote...

I went in a commented out that whole section but it did not seem to work as I could still remove the henchman from the party. Not a big deal, I will just have to make the disclaimer that if anyone uses that method they will break some quests that require the henchman.



I just tested it by commenting out the section.  It worked for me.  Here is the steps I took. 

  • opened the x0_inc_henai script.
     

  •  Commented out the section. // a SendMessage to PC would be a better option. 
     

  •   Saved the script.  If the script is not saved after editing the changes will not take effect.  The compiler uses the include that is saved to the disk not the one opened in the toolset.


  •   Opened the OnConversation script being used by my henchman: nw_ch_ac4


  •   Recompiled the script. 
     

  •   Shut the script compiler.  
     

  • Tested the module.  It worked.  

EDIT: @Failed.Bard: There is no need to rebuild the module. Just make sure you have saved the Include file before compiling the script it is included in.

Modifié par Lightfoot8, 10 juillet 2011 - 04:28 .


#6
Rowwena

Rowwena
  • Members
  • 33 messages
I tried. Neither script compiled without errors, and it still did not work for me. Dumped both scripts in reloaded them from set, with the same results. Everything else is working so I guess I can just leave it :)

#7
Rowwena

Rowwena
  • Members
  • 33 messages
To clarify - it is the x0_inc_henai script that will not compile. The on spawn script compiles until I open the x0_inc_henai script. Once it has made the copy for my module it will not compile, and then trying to compile the spawn script then also will not compile - reflecting the error in the other script.

#8
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

Rowwena wrote...

To clarify - it is the x0_inc_henai script that will not compile. The on spawn script compiles until I open the x0_inc_henai script. Once it has made the copy for my module it will not compile, and then trying to compile the spawn script then also will not compile - reflecting the error in the other script.


Well the x0_inchenai include should not compile, it is not a script, it is an include.  

If the only change you have had is  to the  x0_inc_HenAI include and the OnSpawn script will no longer compile, An error was most likely made in editing the include script.   here is the portion that i edited out.  

it is the begining of the case statment to just after the first bracket after the break. 

        }
        break;
    /*case ASSOCIATE_COMMAND_LEAVEPARTY:
        {
            oMaster = GetMaster();
            string sTag = GetTag(GetArea(oMaster));
            // * henchman cannot be kicked out in the reaper realm
            // * Followers can never be kicked out
            if (sTag == "GatesofCania" || GetIsFollower(OBJECT_SELF) == TRUE)
                return;
            if(GetIsObjectValid(oMaster))
            {
                ClearActions(CLEAR_X0_INC_HENAI_RespondToShout4);
                if(GetAssociateType(OBJECT_SELF) == ASSOCIATE_TYPE_HENCHMAN)
                {
                    FireHenchman(GetMaster(), OBJECT_SELF);
                }
            }
            break;
        } */

    }
}

#9
Rowwena

Rowwena
  • Members
  • 33 messages
It's working now. I though that is how I did it the first time but I must have messed it up. Third time is the charm. Thanks so much Lightfoot !

#10
La Rose Noire

La Rose Noire
  • Members
  • 25 messages
Strangely, my FireHenchman() function doesn't work, exactly as if i did nothing. Is this ligne useful ?

ClearActions(CLEAR_X0_INC_HENAI_RespondToShout4);

what does it mean ?