quickman237 Posted March 25, 2017 Share Posted March 25, 2017 (edited) I'm still relatively new to making my own mods. I am trying to add some extra bling to my game by making Tunnelers and Marked Men appear around the Mojave after one the two end missions from Lonesome Road DLC is completed. (Either Nuking someplace or not nuking). This also includes a message that pops up that warns you that there will now be new enemies about. So far I am testing tunneler spawns. Here is the script: scn MojaveTunnelerSpawnScript begin GameMode If (GetStage NVDLC04MQ03b == 100) || (GetStage NVDLC04MQ04 == 100)showMessage MojaveDivideCrossMSGMojaveTunneler1.enableMojaveTunneler2.enableMojaveTunnelerV1.enableMojaveTunnelerV2.enableendIf end So far, the message doesn't pop up, and the enemies do not. I added this script after I completed one of those quests, so I thought that may have caused to not work, but I have loaded an earlier save and it didn't get any results. Am I just going about this incorrectly? Any help is appreciated. EDIT: I just noticed the typo in the title lol Edited March 25, 2017 by quickman237 Link to comment Share on other sites More sharing options...
madmongo Posted March 25, 2017 Share Posted March 25, 2017 Where is this script? Is it attached to a spawn item or is it part of a quest or.... ? If I were doing it, I would make it a quest script and use it in a quest. Make sure Start Game Enabled on the quest is checked so that it will run as soon as the mod is installed. You should also have a variable like DoOnce so that the script doesn't constantly send out the message and constantly enable the references after they are already enabled. Something like this: scn MojaveTunnelerSpawnScript int TunnelersDoOnce begin GameMode If (GetStage NVDLC04MQ03b == 100) || (GetStage NVDLC04MQ04 == 100)If (TunnelersDoOnce!=1)showMessage MojaveDivideCrossMSGMojaveTunneler1.enableMojaveTunneler2.enableMojaveTunnelerV1.enableMojaveTunnelerV2.enableSet TunelersDoOnce to 1endifendIf end Link to comment Share on other sites More sharing options...
quickman237 Posted March 25, 2017 Author Share Posted March 25, 2017 Well, I guess the script just kind of exists. I haven't really put into a quest or anything like that. I have all of the references in the world and all. I will try the suggestion you have about putting into a quest first and tell you if it works. Thanks, dude. Link to comment Share on other sites More sharing options...
quickman237 Posted March 25, 2017 Author Share Posted March 25, 2017 Your suggestion made it work! Thanks a lot! :) Link to comment Share on other sites More sharing options...
PushTheWinButton Posted March 25, 2017 Share Posted March 25, 2017 (edited) I'd suggest placing a marker called MojaveTunnelersREF or something, set to initially disabled, and using the script to enable it. Then just set this marker as the enable parent for all your Tunneller placements. This method means you don't have to enable every spawn individually in the script, and means you can add more spawns at a later date without having to modify the script at all. You could potentially do away with the DoOnce variable too, and simply check GetDisabled on the marker. Your choice. Another way is to simply StopQuest once it's done what's needed - that way it's not running any script at all. Edited March 25, 2017 by PushTheWinButton Link to comment Share on other sites More sharing options...
quickman237 Posted March 25, 2017 Author Share Posted March 25, 2017 And how would I be able to set the marker as the parent for all of the placements? Just wondering. That sounds much more efficient. Link to comment Share on other sites More sharing options...
quickman237 Posted March 25, 2017 Author Share Posted March 25, 2017 nvm, I figured that out. Thanks guys! :) Link to comment Share on other sites More sharing options...
Mktavish Posted March 26, 2017 Share Posted March 26, 2017 I thought I would poke my nose into this already solved thread , since it seems a fundamental misunderstanding was the culprit . There are 3 kinds of scripts which I am sure you may be aware of since you easily switched to Quest type.The default is an "Object" script when creating one. Which means this is a script that can be attached to anything in the object tree that has a "script" drop down field ... except for Quests and Base Effects . Quests require you to select the script as a "Quest" type script ... and Base Effects require you to select it as an "Effect" type script ... meaning when you are on the window with the "Script" drop down ... only those type of scripts will show up in the list. Effect scripts on "Assoc Item" just below "Effect Archetype" But object scripts and quest scripts are strait forward on where to attach the script. So in short ... creating a script / saving it to then exist. Means nothing towards having that script tell the engine what to do.You must attach it to something (one of the 3) to then have the code pick a point to interact with the other fluid game code. Link to comment Share on other sites More sharing options...
Recommended Posts