Jump to content

How to add in scripts?


kvatchcount

Recommended Posts

So, I'm working on a update for one of my NV mods. I need to edit the final scripts in I Fought The Law so some stuff will be added to the game post-quest. I know the proper way of writing the script, but I can't get it to stay in the resulting scripts in

I Fought The Law

stage 105. This is the script:

 

1PGSpawn4REF.enable
1PGSpawn5REF.enable
1PGSpawn6REF.enable
1PGSpawn3REF.enable
1PGSpawn2REF.enable
1PGSpawn1REF.enable
1PGSpawn7REF.enable
These won't stay on the resulting script tab when I click off of it, even when compiling. Can anyone help out here?
Link to comment
Share on other sites

Same thing happened to me. I'm going to presume that you made these Powder Gangers yourself and maybe you didn't make them persistent references. Otherwise, there's just not a lot of information here for me to use to help you.

 

Also, I don't know what your mod is, but if I were doing this myself, in most cases I would try to avoid touching the quest script directly, for compatibility's sake. You can get the stage of I Fought The Law or check for Eddie's death, among other things, in a number of ways if you need to.

Link to comment
Share on other sites

What exactly are you trying to do? Are you using GECK PowerUp? It should tell you what's wrong with your scripts, more or less.

 

You may think it's an inconsequential quest line, and that would be the exact reason someone else may touch it. I can't stress enough how strongly I advise against it. It's against modding etiquette as well. Your prerogative in the end of course, but I wouldn't.

 

Also, just realised, you're starting your references with numbers. Try changing that, as it messes with scripts in the GECK. I'm almost certain that's your problem actually.

Link to comment
Share on other sites

Ya I would stress the same thing as EPDGaffney said ... make your own quest running a script to execute those Enable commands. But stop gated by ... GetStage

 

SCN MyScript

 

Short DoOnce

 

Begin GameMode

 

If GetStage theQuest == 105 && DoOnce == 0

zz1PGSpawn4REF.enable

zz1PGSpawn5REF.enable
zz1PGSpawn6REF.enable
zz1PGSpawn3REF.enable
zz1PGSpawn2REF.enable
zz1PGSpawn1REF.enable
zz1PGSpawn7REF.enable
Set DoOnce to 1
endif
END
~~~~~~~~~~~
Add edit: Oh wait ... you need a doOnce variable or SetStage ?
Added SetStage above ... double check the wiki here http://geck.bethsoft.com/index.php?title=SetStage
Wait again ... we can't use setstage on the vanilla quest ... sorry has to be a doOnce ...
Will re-edit for that.
Final edit: err maybe it should be a StopQuest :huh:
Stop the Quest that is running this script .
Link to comment
Share on other sites

Great, how did you fix it? Was it the numbers?

 

@MkTavish

I would need to look at where these Powder Gangers are that need to be enabled and where the player is, but I'd probably go one step further and not even use a GameMode block. In this case, if I personally were doing it, I'd go for something a little advanced and use this function:

https://geckwiki.com/index.php/SetOnQuestStageEventHandler

 

But for someone with less experience that doesn't want to deal with event handlers, there are other ways. Not that a GameMode block is the end of the world anyway; I just like to minimise them as part of my own code, mostly in case someone has too many other scripts running from a lot of mods that were less cautious. In that situation, my mod would function the smoothest. But that's a generally extreme situation, really.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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