Aller au contenu

Photo

Difference between SCRIPTSET_PLAYER_DEFAULT and SCRIPTSET_COMPANION_POSSESSED?


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

#1
andysks

andysks
  • Members
  • 1 645 messages

Hi all. I have this question because a testers reported that a companion died and had this walking image on his avatar, so he was dead and didn't behave as a companion. Now, this companion, gets spawned as a normal NPC because you might fight him. If you don't, and accept him in party, then I change his scripts using the:

void SetCreatureScriptsToSet( object oCreature, int nScriptSet );

I set the nScriptSet to 3, which is SCRIPTSET_PLAYER_DEFAULT. Is that wrong? Which script sets companions use?

 

EDIT: I looked at the 2da, and 3 seems to be the one using the gb_comp scripts. So I guess I'm doing it all correct. Anyone had issues with this function then?



#2
Tchos

Tchos
  • Members
  • 5 042 messages

Did you set the NPC's listening patterns manually to compensate for the fact that you spawned him as a normal NPC without a companion's listening patterns, which are set in the companion's spawn script?  Simply switching to the script set will not do it if the character is already spawned.  I had to do this for one of my companions.



#3
andysks

andysks
  • Members
  • 1 645 messages

Yes I actually did this by running the gb_comp_spawn at the end of the same script. I just noticed something though. I am using object oComp for the 

void SetCreatureScriptsToSet( object oCreature, int nScriptSet );

but OBJECT_SELF for the

 ExecuteScript ("gb_comp_spawn", OBJECT_SELF);

This convo doesn't start by talking to him, but from a trigger and the convo is owned by an ipoint placeable. I think the script runs the gb_comp_spawn on the ipoint, therefore the companion stays as he is. I guess this is solved :).



#4
Dann-J

Dann-J
  • Members
  • 3 161 messages

I've occasionally experienced the 'player has left the server' portrait (the shadow walking towards a glowing door) when a companion bleeds to death from an enemy with a weapon that has an on-hit wounding property, and you save and reload the game while they're 'dead'. I doubt that was the issue in your case though (it's most likely a dodgy script set change, as per your diagnosis).