Aller au contenu

Photo

despawnrostermember


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

#1
PJ156

PJ156
  • Members
  • 2 986 messages

ga_despwnrostermember() is causing the game to crash to desktop.

 

Any thoughts why that might be?

 

PJ



#2
andysks

andysks
  • Members
  • 1 652 messages
Happened to me too. I just didn't use the script anymore. I will go home soon and look at it. Now I will probably know what causes it because my companions work perfectly, and i understood a lot on the how after the long talks I had with colors fade.

#3
PJ156

PJ156
  • Members
  • 2 986 messages

Thanks Andy,

 

Not sure what this is about, it has worked before. Look forward to hearing your thoughts.

 

PJ



#4
andysks

andysks
  • Members
  • 1 652 messages

Hi Peter. There are two things I noticed but as you know, my scripting knowledge is not one of the best so I might be throwing blanks here.

 

The DespawnRosterMember is a function of ginc_companion linked to the hangouts. I believe when I say to a companion Go home, and I call ga_rm_go_to_hangout this function is called. This is from the ginc_companion.

 

    // move or despawn RM as needed to go to hangout.
    object oHangOut = GetHangoutObject(sRosterName);
    if (!GetIsObjectValid(oHangOut))    
    { // hangout is not in this module, despawn and let module load take care of it.
        PrettyDebug("GoToHangOutSpot(" + sName + "): hangout is not in this module, despawn and let module load take care of it");

        DespawnRosterMember( sRosterName );
    }

 

Now, the default hangout of a companion is spawn_* where * is roster member. If your companion spawn in any other way, then the function doesn't know what to do, where to save them, send them etc.



#5
Loki_999

Loki_999
  • Members
  • 430 messages

Never used rosters myself, but you could possibly just remove them from the roster and then use destroyobject i would have though?



#6
andysks

andysks
  • Members
  • 1 652 messages

Well then it's gone. Items, levels... everything. If you want to bring a companion back you cannot destroy them :). When the script comment says "removes them from the game", it actually means yes, removes them but it also says "saves their state".



#7
kevL

kevL
  • Members
  • 4 070 messages

here's the nwscript.nss description for DespawnRosterMember()

It's the only function call in 'ga_roster_despawn' - if that's what you mean PJ - so if there's a problem it's in the h-code and needs a workaround,


//RWT-OEI 09/15/05
//Despawn Roster Member
//This function removes the Roster Member from the game after saving them
//out so that any changes will be preserved.  This is the matching function
//to SpawnRosterMember() and in general should be the only script function
//used to remove Party Member NPCs from the game world.
int DespawnRosterMember( string sRosterName );


#8
kevL

kevL
  • Members
  • 4 070 messages

Are you guys perhaps trying to despawn a roster member that doesn't exist?

 

Or maybe despawning a character before removing it from the party?

 

 

either/both those *could* be a problem ...



#9
PJ156

PJ156
  • Members
  • 2 986 messages

I'm not sure to be honest. I am going to do a little homework on my old mod since it worked there.

 

Thanks for the tips. For now it does not matter I have time. I just wondered why it was crashing me to desktop. it's a pretty extreme crash.

 

I'm in win 7 now and lots of odd things are popping up.

 

PJ