By coincidence I encountered something that might be a bug in ga_jump_players. I use this script all the time when jumping the player to one area or another through dialogue. I have always set the bWholeParty to TRUE (or 1, the same thing) even though in the description it says it does nothing in campaign mode. So when testing a thing, I happened to leave this to 0, and then when I fired my OnClientEnter script it didn’t think that a player character had entered. Really strange (or maybe it’s logical?)
I had this function running on the OnClientEnter:
object oPC = GetEnteringObject();
if(!GetIsPC(oPC)) return;
and when things didn’t happen as they should I did a thing like this:
if(!GetIsPC(oPC))
{
SendMessageToPC(oPC,"The entering object is not a player. What?!?!");
return;
}
and I got that message when choosing 0 at bWholeParty. Maybe I’m interpreting the stock script wrong. Here’s the ga_jump_players script in its entirety:
// ga_jump_players(string sDestTag, int bWholeParty, int bOnlyThisArea)
/*
Jumps the PC party to a waypoint or object.
Parameters:
string sDestTag = Tag of waypoint or object to jump to.
int bWholeParty = DOES NOTHING IN CAMPAIGN. If =0 then jump the PC only, else jump the PC's party.
int bOnlyThisArea = DOES NOTHING
*/
// ChazM 3/11/05
// BMA-OEI 1/11/06 removed default params
// EPF 2/6/06 -- fixed the loop in JumpParty to deal with multiple parties
// ChazM 3/3/06 - replaced JumpParty() w/ JumpPartyToArea() script command. Modified to always jump whole party in campaign.
// ChazM 7/13/07 - Dominated removed from party if campaign flag set.
#include "ginc_debug"
#include "ginc_transition"
// Jump oPC's whole party.
// oPartyMember - member of the party to jump
// oDestination - the destination (typically a waypoint object)
// bOnlyThisArea - Jump only members of the party in the same area as oPartyMember? Default is true
void JumpParty(object oPartyMember, object oDestination, int bOnlyThisArea)
{
object oThisArea = GetArea(oPartyMember);
object oJumper = GetFirstFactionMember(oPartyMember, FALSE);
if(GetIsPC(oJumper))
{
oJumper = GetNextFactionMember(oPartyMember, FALSE);
}
while (GetIsObjectValid(oJumper) == TRUE)
{
if (!bOnlyThisArea || (GetArea(oJumper) == oThisArea))
{
AssignCommand(oJumper, JumpToObject(oDestination));
}
oJumper = GetNextFactionMember(oPartyMember, FALSE);
}
oJumper = GetFirstFactionMember(oPartyMember, TRUE);
while (GetIsObjectValid(oJumper) == TRUE)
{
if (!bOnlyThisArea || (GetArea(oJumper) == oThisArea))
{
AssignCommand(oJumper, JumpToObject(oDestination));
}
oJumper = GetNextFactionMember(oPartyMember, TRUE);
}
}
void main(string sDestTag, int bWholeParty, int bOnlyThisArea)
{
object oPC = (GetPCSpeaker()==OBJECT_INVALID?OBJECT_SELF:GetPCSpeaker());
if ( GetGlobalInt(CAMPAIGN_SWITCH_REMOVE_DOMINATED_ON_TRANSITION) == TRUE )
{
int nRemoved = RemoveDominatedFromPCParty(oPC);
}
object oDestination = GetObjectByTag(sDestTag);
if (bWholeParty == 0 && GetGlobalInt(VAR_GLOBAL_GATHER_PARTY)==0)
{
AssignCommand(oPC, JumpToObject(oDestination));
}
else
{
// BMA-OEI 6/14/06
SinglePartyTransition( oPC, oDestination );
//JumpPartyToArea(oPC, oDestination);
//JumpParty(oPC, oDestination, bOnlyThisArea);
}
}
EDIT: Looking at it some more, and looking at my other scripts when jumping the PC not from dialogue, I see that I tend to always use the JumpPartyToArea function. So maybe things go wrong since this script uses AssignCommand(oPC, JumpToObject(oDestination)); when setting bWholeParty to 0? In any case I think it seems a bit scary and dumb to place the
int bWholeParty = DOES NOTHING IN CAMPAIGN.
if that is, as it seems, false.