Aller au contenu

Photo

ga_roster_despawn issues


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

#1
PJ156

PJ156
  • Members
  • 2 985 messages
I am using the script ga_roster_despawn called from a convo on the action script.

I seem to crash the game to desktop whenever it fires.

Has any one come across this before. I usd it in my last mod and it tested/played okay there.

Cheers,

PJ

#2
PJ156

PJ156
  • Members
  • 2 985 messages
I have spent the last few hours trying to work round this and I can't do it.

I have created a custonm script to depsawn the party member, I have renamed the stock script and I have tried running the script from the campaign folder.

Any script I run using DespawnRosterMember in any shape or form that I have tried instantly crashes the game to the desktop.

I have a workaround planned at the moment using RemoveRosterMemberFromParty but that does not save the state of the character as they leave. So I am going to have to dump thier gear first, remove them then respawn them at thier waiting spot. I can match exp when they rejoin. But its all a faff as it is beyond my scrpting knowledge right now to dump the kit anywhere the Pc may want since it needs a waypoint to dump to. Thus I am limited to only allowing the PC to lose a party member in a location of my choice. 

What i would really like to do is despawn roster member Image IPB

If anyone has any thoughts I would be gratefull for them.

PJ

#3
Shallina

Shallina
  • Members
  • 1 011 messages
you need to remove the roster member from party before despawning him, I think.

to save the caracter in the states they are you need to set them as campaign NPC, it will be automatic.

ga_move_exit will despawn roster member correctly.

Modifié par Shallina, 29 janvier 2011 - 07:27 .


#4
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: see http://nwn2forums.bioware.com/forums/viewtopic.html?topic=559412&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);
}

I don't have any experience with campaign NPC's even though I use campaigns. My NPC' s are spawned from campaign blueprints. I haven't seen any issues with them traversing modules within a campaign. See my King's Festival campaign for functioning examples.

Regards

Modifié par Kaldor Silverwand, 29 janvier 2011 - 08:02 .


#5
PJ156

PJ156
  • Members
  • 2 985 messages
Thanks for the replies guys,

I will try your Script Kaldor and see if that imporves things. I had not thought to use ga force exit.

The blueprints are module blueprints. I did not see the need to make them campaign bluepringts at this stage as they are only needed within this module. Should I make them campaign?

I don't understand how this should matter.

Thanks again,

PJ

#6
Shallina

Shallina
  • Members
  • 1 011 messages
the roster is something that belong to the campaign.

#7
PJ156

PJ156
  • Members
  • 2 985 messages

Shallina wrote...

the roster is something that belong to the campaign.


I understand, thank you.

So ga_roster_add will automatically make the NPC a campaign resource if you are using a campagn structure.

PJ

#8
Guest_Chaos Wielder_*

Guest_Chaos Wielder_*
  • Guests
Yes, make them campaign. Any character that is going to be moving between modules needs to be a campaign NPC.