KG989 Posted September 25, 2013 Share Posted September 25, 2013 Hello I have been trying to complete a small mod to create an NPC located around scorpion gulch who would spawn as the player came near the basin to attack scorpions and the player on the players entering of one of a few triggers around the basin area. Although I have the NPC, triggers, and NPC placement, inventory, and AI packages all sorted out making a working script that enables the initially disabled NPC to spawn on the players entering of one of the triggers. Recently I have been trying to use this script I found in a tutorial of the like for fallout 3 with no luck. scn [npc ID]script begin ontriggerenter player [npc ID].enable end If anyone could provide ANY assistance to solve my problem I would be greatly appreciative of any assistance tendered. Thank you. \ ~KG Link to comment Share on other sites More sharing options...
spartenkiller897 Posted September 25, 2013 Share Posted September 25, 2013 It has to be the NPC's refid not its base ID, if you don't know what that is, click on your NPC that is in scorpion gulch and then double click on him. A dialogue box should appear where you checked initially disabled. In that same dialogue box is a refid box, there you give him some unique Reference id and use that ID in scripts rather than his base ID. Link to comment Share on other sites More sharing options...
Jojash Posted September 25, 2013 Share Posted September 25, 2013 (edited) It has to be the NPC's refid not its base ID, if you don't know what that is, click on your NPC that is in scorpion gulch and then double click on him. A dialogue box should appear where you checked initially disabled. In that same dialogue box is a refid box, there you give him some unique Reference id and use that ID in scripts rather than his base ID. One thing that I would add, is that, if you're trying to enable multiple NPCs, you'll need to make sure that the NPC you're enabling is the Enable Parent of the other NPCs for them to be enabled when you enable that one. Here's some more information on enable parents. Edited September 25, 2013 by Jojash Link to comment Share on other sites More sharing options...
KG989 Posted September 25, 2013 Author Share Posted September 25, 2013 (edited) Trying these actions now to see if they will solve my problem. Thank you for the prompt replies! Update: I was able to successfully code the script thanks to spartenkiller897's help Edited September 25, 2013 by KG989 Link to comment Share on other sites More sharing options...
KG989 Posted September 25, 2013 Author Share Posted September 25, 2013 It has to be the NPC's refid not its base ID, if you don't know what that is, click on your NPC that is in scorpion gulch and then double click on him. A dialogue box should appear where you checked initially disabled. In that same dialogue box is a refid box, there you give him some unique Reference id and use that ID in scripts rather than his base ID.Allright I was finally able to get the script to code properly thanks to your help. now I have to ask. Is there a way to make these triggers spawn this particular NPC into the world only once so that he's not present every time that a player enters Scorpion Gulch? Link to comment Share on other sites More sharing options...
roman200333 Posted September 25, 2013 Share Posted September 25, 2013 It has to be the NPC's refid not its base ID, if you don't know what that is, click on your NPC that is in scorpion gulch and then double click on him. A dialogue box should appear where you checked initially disabled. In that same dialogue box is a refid box, there you give him some unique Reference id and use that ID in scripts rather than his base ID.Allright I was finally able to get the script to code properly thanks to your help. now I have to ask. Is there a way to make these triggers spawn this particular NPC into the world only once so that he's not present every time that a player enters Scorpion Gulch? I have no experience in scripting but can you make the trigger, disable itself once you you trigger it? Link to comment Share on other sites More sharing options...
KG989 Posted September 25, 2013 Author Share Posted September 25, 2013 It has to be the NPC's refid not its base ID, if you don't know what that is, click on your NPC that is in scorpion gulch and then double click on him. A dialogue box should appear where you checked initially disabled. In that same dialogue box is a refid box, there you give him some unique Reference id and use that ID in scripts rather than his base ID.Allright I was finally able to get the script to code properly thanks to your help. now I have to ask. Is there a way to make these triggers spawn this particular NPC into the world only once so that he's not present every time that a player enters Scorpion Gulch? I have no experience in scripting but can you make the trigger, disable itself once you you trigger it? You know I actually thought of that very solution about 10 minutes after posting. It's so simple I thought that it should work so I added it to the script on the 3 respective entrances to the gulch and so that as soon as one is entered the script will disable all 3 triggers after spawning in the NPC. Yes to do much testing on it though as it's only me at the moment. Link to comment Share on other sites More sharing options...
spartenkiller897 Posted September 26, 2013 Share Posted September 26, 2013 Glad I could be of some help, I learned how to do this when I was working on run a shop. Link to comment Share on other sites More sharing options...
KG989 Posted September 26, 2013 Author Share Posted September 26, 2013 Glad I could be of some help, I learned how to do this when I was working on run a shop. So far with all your help I've been able to get the encounter to work properly. Due to some bone head moves on my part though initially as I was testing it the NPC wouldn't actually use the weapon he was given and would instead fight the scorpions barehanded. However I that was fixed by giving him some damn ammo for it. Thank you for all your help you've been great. Link to comment Share on other sites More sharing options...
Recommended Posts