Aller au contenu

Photo

Removing roster member and keeping them from disappearing (resolved )


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

#1
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I want to remove a companion, but keep them around.  I'm using the script ga_roster_party_remove.  Should I be using a different one, or are there other scripts that must be used in conjunction with this one?

Modifié par M. Rieder, 08 juin 2011 - 01:09 .


#2
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
After I used ga_roster_party_remove, I used ga_roster_spawn and spawned the party member back to the same spot. It worked. I don't know if it is the best way, but it seems to work.

If anyone knows a cleaner way to do it, I'm interested.

#3
Morbane

Morbane
  • Members
  • 1 883 messages
AFAIK - RemoveRosterMemberFromParty() will simply leave the companion or henchman where they stand when executed.

#4
Shallina

Shallina
  • Members
  • 1 012 messages
open the scripts that do almost what you want, and change what need to be changed, rename it differently, and use it.

ga_roster_party_remove has a despawn instruction, you need to remove it to have something clean if you don't want the NPC to deasapear.

here a generic  script  wich remove a party member

[nwscript]

//this script will remove the NPC with "tag" as tag from the party
//tag is the roster name of the Object
void main(string tag){

     AssignCommand(GetObjectByTag(tag),ClearAllActions(TRUE));
     RemoveRosterMemberFromParty(tag,GetFirstPC(TRUE),FALSE);


}

[/nwscript]

Modifié par Shallina, 08 juin 2011 - 08:55 .


#5
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Thanks for the info.

#6
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
I use this script:

// bb_roster_party_remove

// author: Dick Loraine
// date: April 16, 2007
// instigator: Brendan Bellina
// info: <http://nwn2forums.bi...9412&forum=114>

// Used to eject a companion from the party and respawn
// the companion in place. The respawn is needed to force
// the inventory of the character to be saved, otherwise
// when you add the person back into the party any
// unequipped items will be gone.

#include "ginc_param_const"

void main(string sRosterName, string sTarget)
{
object oTarget = GetTarget(sTarget, TARGET_PC);
object oCompanion = GetObjectFromRosterName(sRosterName);
location lTarget = GetLocation(oCompanion);

RemoveRosterMemberFromParty(sRosterName, oTarget);
SpawnRosterMember(sRosterName, lTarget);
}