Jump to content

Need help with a script


hawhaw521

Recommended Posts

Yeah can you help me create a script? I have close to no knowledge of how to write scripts.

 

Well first question still is ... Do you want it to function like it does in the VMS18 Quest ?

With it just making the body you are dragging disappear once you click on the dumpster activator ?

Or how about using the static of a dumpster with its lid open ... and the player needs to actually drop a body in it ?

 

For your purposes , the second option may be easier.

Link to comment
Share on other sites

Sorry i'M taking so long ...

 

Well First off I can't make the static dumpster work.

Second I am having trouble making it work like that quest.

2 items with scripts. Not working

 

So I think I need to make a quest ... with stages and objectives ... and a script I think ?

 

short story ... have to set up clicking on dumpster to stash body. Then make a quest out of it.

 

Is this for your personal use ... or do you want to publish this mod ?

 

I can just make the file ... then you add to your story .

Link to comment
Share on other sites

Well personal is fine ... thats the only modding I play with.

 

What you need to do is build your lvl item (list) or just write a list of all the stuff you want to be loot in the dumpster.

Edited by Mktavish
Link to comment
Share on other sites

Ok I have the list:

A weapon that I made in the GECK

Alien Power Cells

Any other guns in the game

Any of the armor in the game

If you mean like I have to choose the specific things to put in the dumpster then I can just come up with some specific weapons and armor.

Link to comment
Share on other sites

Ya it has to be specific base-IDs ... which the script then calls to and picks something on it.

The leveled items are good to do this with ... because they take care of the random roll aspect .

And putting lvled items inside of lvled items also.

 

For example you have 1 main lvled item called "MyDumpsterLoot" for example.

 

Then a group of secondary ones placed in it called (for example) ...

 

PistolDumpsterLoot

RifleDumpsterLoot

BigGunDumpsterLoot

MeleWeaponDumpsterLoot

 

Etc ....

 

Then inside those you put the actual weapons , or even other lvled items , Like a specific gun with ammo.

 

But the scripting only has to call to the main lvled item .

 

FYI : to build a lvled item ... you drag drop things from the list just like placing things in npc/container inventory.

If you set those up , then my script will just have a dummy lvled item for you to replace with yours.

 

Can you tell me the cell and basic location you would like to place the dumpster ?

Then I'll set up all the refs it needs ... and was thinking to start the quest ... just have a note inside the dumpster to start it.

Edited by Mktavish
Link to comment
Share on other sites

Ok I have the main leveled item with everything inside. How do I send it to you? Also the basic location is Goodsprings and I actually created my own building. I was wanting to put the loot in a locker inside the building I made. But if you can't do that then you can just put it anywhere you'd like in Goodsprings.

Link to comment
Share on other sites

Ok I figured it out ... which I can just take your file and add everything ... sending you a PM for emailing to me.

 

Or if you want to give it a shot yourself ... here is instructions and the scripts.

But before trying ... make a back up of how you have it presently with your dumpster & locker placed. And your Lvled Item created. To send me that if you decide you want me to take it from there.

 

Green is Base-IDs you created in the Object tree

Orange is Ref-IDs you created in the Render window

 

OK so having placed your Unique Base-ID dumpster & Unique Base-ID Locker. And given them Ref-IDs

(Example: MyDumpsterRef & MyLockerRef )

 

Find this Item in the Object list "VMS18Dumpster" Change the Base-ID /Create New Form (example: MyDumpsterActivator)

Now place it where your dumpster is , and give it a ref-ID (MyDumpsterActivatorRef) Flag it persistent and initially disabled.

 

Now create a new message "MyNobodyMessage" uncheck the "Message Box" flag ... and write a message in the message text field ... for example : You have no body to dump ... make sure it is grabbed with Z key.

 

Now create a new note "MyDumpBodyNote" Give it a name atleast for what the player will see in inventories. Add text or whatever for the note if desired. The base-ID is the important part though , to use it in scripts.

Place it where ever you want ... this will start the quest when player has it.

 

Now create a new quest "MyBodyDumpQuest" On the name , type in what you want the player to see it as.

Flag it Start game enabled & Allow repeated stages.

 

Go to the Quest Objectives tab and give it Objectives " 10 ,20 ,30 "

 

On Objective 10 type in text example : Dump a Body in the Dumpster .

With Having your "MyDumpsterActivatorRef" showing in render window first , right click in "Target Ref" field "New"

Now click "Select Reference in Render Window" button ... and you will see the render window and be able to double click on your dumpster with the crosshair when it turns white.

 

On Objective 20 type in text example : You have Dumped a Body ... Time to Wait .

 

On Objective 30 type in text example : Check Locker for Loot .

With having your "MyLockerRef" showing in render window first , do same step as 10

 

Go to the Quest Stages tab and give it stages " 0 ,10 ,20 ,30 "

 

On Stage 10 right click "New" in the top "Log Entry" field ... then put these lines in the "Result Script" field

MyDumpsterActivatorRef.Enable
MyDumpsterRef.Disable
SetObjectiveDisplayed MyBodyDumpQuest 10 1
Then click "Compile Result" button
On Stage 20 right click "New" in the top "Log Entry" field ... then put these lines in the "Result Script" field
MyDumpsterRef.Enable
MyDumpsterActivatorRef.Disable
SetObjectiveDisplayed MyBodyDumpQuest 10 0
SetObjectiveDisplayed MyBodyDumpQuest 20 1
Then click "Compile Result" button
On Stage 30 right click "New" in the top "Log Entry" field ... then put these lines in the "Result Script" field
MyLockerRef.AddItem MyDumpsterLvledLoot 1
SetObjectiveDisplayed MyBodyDumpQuest 20 0
SetObjectiveDisplayed MyBodyDumpQuest 30 1
Then click "Compile Result" button
Then click OK on the bottom of Quest window.
Make this script as a " Script Type : Object " And put it on your Locker base-ID

SCN MyLockerScript

Begin OnActivate Player

If GetObjectiveDisplayed MyBodyDumpQuest 30 == 1
SetObjectiveDisplayed MyBodyDumpQuest 30 0
SetStage MyBodyDumpQuest 10

Activate
else
Activate

endif
End

 

Make this script as a " Script Type : Object " And put it on your MyDumpsterActivator

 

SCN MyDumpsterActivatorScript

Ref rBody

Begin OnActivate Player

Set rBody to GetPlayerGrabbedRef
If rBody.GetDead ==1
rBody.Disable
rBody.MarkForDelete
SetStage MyBodyDumpQuest 20
Else
ShowMessage MyNobodyMessage

endif
End

 

 

Make this script as a " Script Type : Quest " And put it on your MyBodyDumpQuest

 

SCN MyBodyDumpScript

Float fTimer
Int DoOnce

Begin GameMode

If DoOnce == 0 && GetHasNote MyDumpBodyNote
SetStage MyBodyDumpQuest 10
Set DoOnce to 1
endif
If DoOnce == 1 && GetObjectiveDisplayed MyBodyDumpQuest 20 == 1&& fTimer < 120
Set fTimer to fTimer + GetSecondsPassed
ElseIf DoOnce == 1 && GetObjectiveDisplayed MyBodyDumpQuest 20 == 1 && fTimer >= 120
SetStage MyBodyDumpQuest 30
Set fTimer to 0
endif

End

 

 

 

By the way ... where it says "fTimer < 120" & "fTimer >= 120" in the quest script.

That is setting it to a 2 minute wait. So adjust that number to equal what you want for wait time in seconds.

Edited by Mktavish
Link to comment
Share on other sites

  • Recently Browsing   0 members

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