Jump to content

Programmatically managing wires


Recommended Posts

Greetings

 

In adding scale/move/rotate functions to my clipboard mod I'm running into issue handling wires attached to objects being moved.

 

Particularly when I programmatically scale objects it seems to break the wires attached to those objects. Whatever I do the wire won't change to reflect the position of its anchor points, even if the player goes into workshop mode after and manually moves the objects, the wire's appearance doesn't update anyone.

 

I've tried using OnWorkshopObjectGrabbed, OnWorkshopObjectPlaced, and OnWorkshopObjectMoved events to no effect.

I've tried Disabling/Enabling the wire object, and the objects the wire is attached to.

I've tried Disabling/Deleting the wire and recreating it but the original wire doesn't register as being gone and blocks the new wire being created.

 

Anyone got any ideas?

 

Thanks

Edited by Struckur
Link to comment
Share on other sites

One workaround I've found is to destroy the two connected objects and recreate them, then recreate the wire between the new instances of those objects, but this is less the ideal since it means resetting any script attached to those objects and clearing any settler assignments on those objects.

Edited by Struckur
Link to comment
Share on other sites

  • Recently Browsing   0 members

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