Jump to content

Can't Spawning Creatures after Quest?


quickman237

Recommended Posts

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 MojaveDivideCrossMSG
MojaveTunneler1.enable
MojaveTunneler2.enable
MojaveTunnelerV1.enable
MojaveTunnelerV2.enable
endIf
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 by quickman237
Link to comment
Share on other sites

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 MojaveDivideCrossMSG
MojaveTunneler1.enable
MojaveTunneler2.enable
MojaveTunnelerV1.enable
MojaveTunnelerV2.enable
Set TunelersDoOnce to 1
endif
endIf
end
Link to comment
Share on other sites

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

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 by PushTheWinButton
Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...