DieFeM Posted January 14, 2020 Share Posted January 14, 2020 I took for granted that all workshop references were listening to OnWorkshopMode event, but it seems that only the workshop reference does it, so you need to register/unregister for the remote event, since all the other events mentioned get the workshop reference as argument it is pretty simple to do that, so I've done this script that does the object replacement and it seems to work fine: Scriptname SwapRefOnExitWorkshopMode Extends ObjectReference Form Property InvisibleObject Auto Event OnWorkshopObjectPlaced(ObjectReference akReference) RegisterForRemoteEvent(akReference, "OnWorkshopMode") ObjectReference IvisibleObjectRef = PlaceAtMe(InvisibleObject, abInitiallyDisabled = True) SetLinkedRef(IvisibleObjectRef) IvisibleObjectRef.MoveTo(Self) EndEvent Event ObjectReference.OnWorkshopMode(ObjectReference WorkshopRef, bool aStart) If aStart GetLinkedRef().Disable() Enable() Else Disable() GetLinkedRef().Enable() EndIf EndEvent Event OnWorkshopObjectMoved(ObjectReference akReference) GetLinkedRef().MoveTo(Self) EndEvent Event OnWorkshopObjectDestroyed(ObjectReference akReference) GetLinkedRef().Delete() UnregisterForRemoteEvent(akReference, "OnWorkshopMode") EndEvent Link to comment Share on other sites More sharing options...
Sebo85 Posted January 15, 2020 Author Share Posted January 15, 2020 I took for granted that all workshop references were listening to OnWorkshopMode event, but it seems that only the workshop reference does it, so you need to register/unregister for the remote event, since all the other events mentioned get the workshop reference as argument it is pretty simple to do that, so I've done this script that does the object replacement and it seems to work fine: Scriptname SwapRefOnExitWorkshopMode Extends ObjectReference Form Property InvisibleObject Auto Event OnWorkshopObjectPlaced(ObjectReference akReference) RegisterForRemoteEvent(akReference, "OnWorkshopMode") ObjectReference IvisibleObjectRef = PlaceAtMe(InvisibleObject, abInitiallyDisabled = True) SetLinkedRef(IvisibleObjectRef) IvisibleObjectRef.MoveTo(Self) EndEvent Event ObjectReference.OnWorkshopMode(ObjectReference WorkshopRef, bool aStart) If aStart GetLinkedRef().Disable() Enable() Else Disable() GetLinkedRef().Enable() EndIf EndEvent Event OnWorkshopObjectMoved(ObjectReference akReference) GetLinkedRef().MoveTo(Self) EndEvent Event OnWorkshopObjectDestroyed(ObjectReference akReference) GetLinkedRef().Delete() UnregisterForRemoteEvent(akReference, "OnWorkshopMode") EndEvent Okay well it's simple if you are not a total noob in scripting like me :DThank you so much! I hope you know that almost everything you wrote above sounds like chinese to me? :D Do I have to put this script into each static then? Link to comment Share on other sites More sharing options...
Sebo85 Posted January 15, 2020 Author Share Posted January 15, 2020 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/3742Thank you so much man! Yeah well I'm really lost in scripting, I don't know anything about it so if somebody else sacrifices their time, I defintely would appreciate it in any way Link to comment Share on other sites More sharing options...
Sebo85 Posted January 15, 2020 Author Share Posted January 15, 2020 Oh by the way... Don't know if it's important or not, those static will be idle markers with custom animation Link to comment Share on other sites More sharing options...
DieFeM Posted January 15, 2020 Share Posted January 15, 2020 You should put the script in the object that is placed by the constructible object, the visible one, then fill the property InvisibleObject by pointing it to the invisible one.Static objects don't have script holder, so you would need to use another type of form, like movable static, furniture or activator.The model in the constructible object needs to have collision otherwise you wouldn't be able to place it in workshop mode. Link to comment Share on other sites More sharing options...
Sebo85 Posted January 15, 2020 Author Share Posted January 15, 2020 Alright, now thats something I can definetly work with! I can not thank you enough for your time, I really appreciate it! If it's okay to you I will give it a try and hit you up when I run into problems? Link to comment Share on other sites More sharing options...
DieFeM Posted January 15, 2020 Share Posted January 15, 2020 I'm checking this forum daily, usually multiple times, so there's no need of sending private messages if that's what you mean by "hit you up", and any problem you come by could happen to any other person trying to figure out this same thing, so its better to keep posting here, not to mention that other people reading this post could contribute to it and improve the method or find an easier or better alternative to it. Link to comment Share on other sites More sharing options...
Sebo85 Posted January 15, 2020 Author Share Posted January 15, 2020 Nono I was not talking about private messages :) I'm completely with you about that Link to comment Share on other sites More sharing options...
Recommended Posts