Jump to content

[LE] Replacing an object with Papyrus


Recommended Posts

Okay, so I'm rather new to the creation kit in general..

 

I just wanted to ask, is it possible to do so that, let's say either OnActivate, or on the death of a certain NPC (say the boss of a dungeon or something) a wall piece in the dungeon is replaced with an exit people through Papyrus?

 

Sorry if I'm missing something stupid, as mentioned, I am very new to this whole modding thing.

Link to comment
Share on other sites

Only way to accomplish this is using the Creation Kit to pre-place both pieces, the original viewed item and then the one to replace it. Link both to an xMarker such that the xMarker is the enable state parent, set the xMarker as enabled with the original piece as enabled and the replacement piece as initially disabled. Also set the replacement piece to be opposite of the enable state parent. Then with papyrus when you wish to have the items swapped, disable the xMarker. You may wish to also play some FX so that the player doesn't see the swap directly.

 

This is a similar process to purchasing the different rooms in the player bought homes.

Link to comment
Share on other sites

Only way to accomplish this is using the Creation Kit to pre-place both pieces, the original viewed item and then the one to replace it. Link both to an xMarker such that the xMarker is the enable state parent, set the xMarker as enabled with the original piece as enabled and the replacement piece as initially disabled. Also set the replacement piece to be opposite of the enable state parent. Then with papyrus when you wish to have the items swapped, disable the xMarker. You may wish to also play some FX so that the player doesn't see the swap directly.

 

This is a similar process to purchasing the different rooms in the player bought homes.

Okay so this sounds perfect, and whatever would trigger it would be in a different room, so FX wouldn't be necessary.

I'll try this when I get the time, though I've never messed with xMarkers so I know nothing about how those work, dunno if I'll be able to do it but I'll try

Thanks for the help!

 

P.S. I would appreciate if you could possibly like, link me to a guide regarding xMarkers or tell me how to use them, in case I can't figure it out myself. Thanks!

Edited by NiZeKiHo
Link to comment
Share on other sites

You don't necessarily have to use an xMarker. You can just enable and disable the individual items. However, if you have a lot of things that need disabled / enabled, tying them to an xMarker makes the script much easier to write as you only need to disable / enable one thing rather than a whole bunch of things.

 

I don't know how well it describes the process as half an hour is a bit long for me to sit there and watch. But it is the first thing that pops up on a google search.

https://www.youtube.com/watch?v=UQvM520pyjo

Link to comment
Share on other sites

As IsharaMeradin already said...

Also this default vanilla scripts is the one you'll be needing.

 

defaultEnableLinkedRefOnActivate
This script will, variably, disable or enable the reference's linked reference when activated, and then go to a state where its activation does nothing. I.e. disabling a door when a button is pressed, or disableing a wall to show a hidden path when a lever or button is pressed.

 

defaultEnableLinkedRefOnDeath
This script will, variably, enable or disable the actor's linked reference when the actor dies. I.e. enabling treasure when the boss dies or disableing a wall to show a hidden path.
...............................................................................
You might also want to take a look at this resent posted TOPIC, it's similar to yours and i've written a detailed explanation on how to make this process work, step by step.
Edited by maxarturo
Link to comment
Share on other sites

  • Recently Browsing   0 members

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