Jump to content

Weird Mod Scripting Help


Aluminia

Recommended Posts

I have very little scripting experience and I would like some scripting help for the small mod idea I have created.

 

So, the mod idea I have is called "Doc Mitchell's Rainy Day Fund" I want the player to be able to get a nice starting kit when he/she starts the game. I thought a wonderful way to do this by having the player dig up a safe with the items inside of it, including low level weapons and armor. Sadly however, I have no idea how to do this. I know it is possible because I have seen other modders do something like this. I.E. activating something and an object clearing visible gets changed to something different, like flicking a light switch and seeing a light appear, that sort of thing.

 

So, what I basically want is the player to go behind Doc Mitchell's house and see a grave in his backyard. I want the player to use a shovel or maybe their hands to dig into the grave. One activated, or "dug up", I want the grave to disappear and reappear as a dug up grave with a safe in it. One the safe is exposed, I want the player to be able to lock pick it to get the weapons and armor. I will post a picture with a representation of what I want.

 

If someone could please send me in the right direction or provide a script, that would be much appreciated. Thank you.

Link to comment
Share on other sites

I don't have space for a full tutorial here, but in general terms the simplest way to implement this with minimal scripting would be the following:

 

1) Make a new Activator form (we'll call it myGrave for example) and change the Model to Clutter\Coffin\BurialMound01.NIF

 

2) Make a new script, save it, and then pick that script in the Script field for myGrave. The script would look something like this:

SCN myGraveSCRIPT

BEGIN OnActivate

   if IsActionRef player
      disable
   endif

END

3) Place myGrave, the open grave (Static), and the safe (Container) in the world where you want them.

 

4) In the Cell View, edit myGrave. Select the checkbox for Persistent Reference.

 

5) In the Cell View, edit the open grave. On the Enable Parent tab, click "Select Reference in Render Window" and then click on myGrave in the Render Window. Then select the "Set Enable State to Opposite of Parent" checkbox.

 

6) Repeat step 5 for the safe.

 

Only the normal grave will be initially visible. When the player clicks on it, it will disappear and the open grave and safe will appear. The safe can then be opened normally.

 

If you want to require the player to have a shovel, you can create a new message that they will receive if they don't have one (call it myGraveMessage for example) and add a few lines to the script as follows:

SCN myGraveSCRIPT

BEGIN OnActivate

   if IsActionRef player
      if ( player.GetItemCount WeapShovel >= 1  )
         disable
      else
         showmessage myGraveMessage
      endif
   endif

END
Link to comment
Share on other sites

  • Recently Browsing   0 members

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