Jump to content

Need a "smelly" script


antstubell

Recommended Posts

Hi all.

 

I've made a crate full of smelly stuff, its locked and the player is not allowed to open it but for curiousity I'd like that everytime the player is near the crate they get a message saying "Something nearby smells bad". I want this to always happen when the player is near that crate. I've put an xmarkeractivator on the box and resized it to an area around the crate (is this correct?). Now I need a script that will display the message everytime. BTW much later in the quest the player will be able to open one of these crates and discover the source of the smell but not this crate. Thank you.

Link to comment
Share on other sites

i dont know about using an xmarker activator for this, but using a self activation trigger would work, all you have to do is click on the box than click on the button with a "T" in a box and select self activation tigger from the drop down, than create the script

 

Event OnTriggerEnter(objectreference akactionref)

if akactionref == game.getplayer()

debug.messagebox("Something nearby smells bad")

endif

endevent

 

also if you dont want the message box which is somewhat intrusive i believe you can replace "messagebox" with "notification" which if i remember correctly makes the message appear in the top left corner of the screen

Edited by dfac364
Link to comment
Share on other sites

There 3 options for "self" triggers.

 

defaultDisableSelfOnActivate

defaultActSelfOnEnterOnLeaveTRIG

defaultActivateSelfTRIG

 

Which one should I use?

 

EDIT:

 

I used defaultActivateSelfTRIG

 

replaced messagebox with notification and it complied and works, thanks.

Edited by antstubell
Link to comment
Share on other sites

You shouldn't edit default scripts.

 

If someone else does the same, scripts will overwrite eachother making only the last installed mod work.

 

It's instead better to copy the parts of the default script you want and paste them in a new script (with a unique name).

Link to comment
Share on other sites

You shouldn't edit default scripts.

 

If someone else does the same, scripts will overwrite eachother making only the last installed mod work.

 

It's instead better to copy the parts of the default script you want and paste them in a new script (with a unique name).

 

I added the script dfac364 posted as a new script with a unique name "ApproObjScript01" as in screenshot. Is this ok?

Edited by antstubell
Link to comment
Share on other sites

Exactly. Now you can delete the other script.

 

After that i suggest you to verify the CK cache via Steam to restore the old vanilla source.

Verified CK cache, 5 files were being replaced, download was suspended so I thought redownload would be quicker. Deleted local content and reinstalled. Now it crashes everytime I start it up.

Link to comment
Share on other sites

Solved

 

After reinstalling CK the skyrimeditor.ini is replaced with a fresh copy which doesn't include the entry for Dawnguard. So when trying to load DG in CK it crashes. Just for those who don't already know the line should read like this....

 

SResourceArchiveList2=Skyrim - Shaders.bsa, Update.bsa, Dawnguard.bsa

Link to comment
Share on other sites

  • Recently Browsing   0 members

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