Jump to content

Problems with Scripting


jcro25

Recommended Posts

I have been working on a mod for the past year and been trying to work out how to make a script that can enable a NPC or item a few days after a quest or when an NPC has been killed. Ideally I would like the script to enable the NPCs about 3 days later if thats possible?

 

I have tried doing the following but none have worked :/

 

scn NPCEnablerScript

 

Begin OnReset (Load, GameMode)

 

if GameDaysPassed >= 2

 

NPC1REF.Enable

 

END

 

as you can probably tell I am a complete amateur when it come to scripting

any help on this would be appreciated

Thanks in advance,

Jcro25

Link to comment
Share on other sites

Create a quest and give it an ID, example, myquestname. Make a new quest script for this quest, that looks like this:

 

scn myquestscript

short     doonce
short     daystart

Begin GameMode

if (GameDaysPassed - daystart) >= 3 && doonce == 0
    NPC1ref.enable
    set doonce to q
    ;if all you need this quest for is to watch the clock, you can take out the 
    ;doonce and just do
    stopquest myquestname
endif

End

 

Then if it's the death of an NPC that you want to start things, give them this script:

scn mynpcscript

Begin OnDeath

set myquestname.daystart to 1

End

Link to comment
Share on other sites

  • Recently Browsing   0 members

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