StealthDick Posted April 1, 2018 Share Posted April 1, 2018 I have multiple of the same NPC spawning and I want to know how to add all of them to the playerfaction without making them all refs ex: scn NPCScript Begin GamemodeSelf.addtofaction playerfactionendifend its a shitty script but you get the purpose Link to comment Share on other sites More sharing options...
EPDGaffney Posted April 1, 2018 Share Posted April 1, 2018 Are these vanilla NPCs or can you add a script to their base object without conflicting with other stuff? What event causes them to be added to the player faction? Why is this a game mode block? Why don't you want to make them references? Are there just that many? You could maybe use a Linked Ref method. Hard to say without understanding more about how you want this to occur. We may be getting into array variables. You've been warned. Link to comment Share on other sites More sharing options...
Mktavish Posted April 1, 2018 Share Posted April 1, 2018 Use this function instead http://geck.bethsoft.com/index.php?title=SetFactionRank It will set the faction for the base - ID form , therefore all subsequent references relying on it. Link to comment Share on other sites More sharing options...
EPDGaffney Posted April 1, 2018 Share Posted April 1, 2018 Right, forgot in the middle of writing that that we were talking about one base object. Still need to know what causes them to be added so we know how to tell the game when to add the base object to the faction. Only thing I would add is that we should be using the new wiki as it's regularly maintained:https://geckwiki.com/index.php/SetFactionRank Link to comment Share on other sites More sharing options...
Mktavish Posted April 1, 2018 Share Posted April 1, 2018 Ahh sorry ... will try to make an effort in using the new one :sick: ... it's that damn googles fault , LOL :whistling: But yes if this is a vanilla form , that needs to not effect the original. And they have dialogue that still needs to work ? I would recommend duplicating them , then on their dialogue condition of "GetIsID" ... change its "AND" to an "OR"Then below it add another "GetIsID" of the duplicate == 1 with "AND" at the end. Link to comment Share on other sites More sharing options...
EPDGaffney Posted April 1, 2018 Share Posted April 1, 2018 Yeah, Google likes to return the old wiki, which is full of incomplete information and guesses that have been corrected since JIP launched the new one, as a lot of the stuff that we knew to be false sometimes even years earlier never was corrected because it was such a hassle to edit the old wiki. The vast majority of what's there is fine, but you wouldn't want to be caught out depending on one of the outdated bits of information when you could just use the new wiki (which itself is not perfect, as they've not got round to editing everything yet, but that will happen before the old one gets the edits, which is probably never). I'll just wait till OP describes the event whereafter the NPC's faction needs to be changed, as well as whether or not it's a vanilla NPC (which may become a problem). Link to comment Share on other sites More sharing options...
StealthDick Posted April 2, 2018 Author Share Posted April 2, 2018 I found got this working immediately after posting this, thanks for the replies.They are custom npcs and i just gave them a faction and gave the player the faction via a script and it all works good. Link to comment Share on other sites More sharing options...
Recommended Posts