Getting Companion Death Scripts to Work
#1
Posté 17 septembre 2013 - 03:21
With this at the end of my death script, companions ofen are removed from party when killed:
string sScript; if(GetLocalInt(OBJECT_SELF,"nCompanion")==1) { sScript = "gb_comp_death"; ChangeFaction(OBJECT_SELF,GetFirstPC()); if(!GetIsObjectInParty(OBJECT_SELF)) AddToParty(OBJECT_SELF,GetFirstPC()); } else if(GetLocalInt(OBJECT_SELF,"nHenchmen")==1) { sScript = "gb_assoc_death"; ChangeFaction(OBJECT_SELF,GetFirstPC()); } else sScript = "nw_c2_default7"; ExecuteScript(sScript,OBJECT_SELF);
Not sure what's going on.
#2
Posté 19 septembre 2013 - 03:19
#3
Posté 20 septembre 2013 - 04:30
#4
Posté 20 septembre 2013 - 07:48
Modifié par Morbane, 20 septembre 2013 - 07:50 .
#5
Posté 20 septembre 2013 - 07:53
p.s.EpicFetus wrote...
Havin an issue with companion death scripts...trying to use general scripts for all creatures, with a variable fro companions to mark them as such.
With this at the end of my death script, companions ofen are removed from party when killed:
string sScript; if(GetLocalInt(OBJECT_SELF,"nCompanion")==1) { sScript = "gb_comp_death"; ChangeFaction(OBJECT_SELF,GetFirstPC()); if(!GetIsObjectInParty(OBJECT_SELF)) AddToParty(OBJECT_SELF,GetFirstPC()); } else if(GetLocalInt(OBJECT_SELF,"nHenchmen")==1) { sScript = "gb_assoc_death"; ChangeFaction(OBJECT_SELF,GetFirstPC()); } else sScript = "nw_c2_default7"; ExecuteScript(sScript,OBJECT_SELF);
Not sure what's going on.
nobody can read that code - edit it and fix it - then it will be readable.
#6
Posté 23 septembre 2013 - 10:40
#7
Posté 16 novembre 2013 - 09:15
#8
Posté 17 novembre 2013 - 08:16
Which scripts are you using to add them to the party?
#9
Posté 17 novembre 2013 - 02:58
ga_roster_selectable (0)
ga_roster_party_add
#10
Posté 17 novembre 2013 - 04:03
#11
Posté 17 novembre 2013 - 04:43
but it's so complicated i forget exactly what i was on about......
Basically, there's a semi-hidden deathscript (defined in nwn2_scriptsets.2da) that gets called or not depending on whether or not you're controlling the last standing character. Or not...
/maybe





Retour en haut






