Jump to content

Recommended Posts

Posted

Hello guys!

 

So you may already have seen it in some mods, but I couldn't figure out how they did it, so I'm asking you.

 

How can I make a constructable workshop object that is invisible when you leave workshop mode?

 

 

Posted (edited)

I never done that, but there you have a basic idea on how I would go about it:

 

You would need two versions, one version that is visible and another one that is invisible, and "swap" them with a script in OnWorkshopMode event.

 

So you would need to create a constructible object for the visible one, then in the script of this object, in the OnWorkshopObjectPlaced event, use PlaceAtMe to place the visible version in the same spot with the "Initially disabled" flag enabled, and link it to the main object with SetLinkedRef, so you can get the reference of the placed reference with GetLinkedRef in the other workshop events later, and finally use MoveTo to move the placed object, the invisible one, exactly in the same position and rotation than the visible one.

Then you can switch both objects to enabled/disabled in the OnWorkshopMode event as needed.

You would also need to handle when the player moves the object around, so you would need to use OnWorkshopObjectMoved to move the object that you placed with PlaceAtMe along the main object.

Edited by DieFeM
Posted

Okay that sounds pretty good!

Do you think that the makers of invisible marker pack and all of those with invisible rugs did it like this?

Posted

Probably yes, but that's something you could check by yourself. On the other hand I didn't though of it in my previous answer, but you would need to handle the deletion of the placed object in the OnWorkshopObjectDestroyed event as well.

Posted

You were right, I just looked into some similar mods and they used the exact same way.

Now, as a total noob, I need to get this done for me too :D

Posted

Or if it doesn't work, maybe try scripting a material swap, whereas the non-settlement material is invisible

Posted

That's something that goes against a modders "honor", at least here. But people like DieFem, SKK50 or Niston might help you out, they are very skilled.

I'm also trying to find a way when I have finished my current project but that will take some days

 

I'd suggest taking a look at other mods, like this: https://www.nexusmods.com/fallout4/mods/19090

 

 

Use Champollion to decode their scripts: https://www.nexusmods.com/fallout4/mods/3742

  • Recently Browsing   0 members

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