Jump to content

I have a script that works fine most of the time. On the 4th use, the script stops cold. (source gist included)


Monsto Brukes

Recommended Posts

Posted

Here's the entire script source.
 
I posted this thing yesterday, thinking I could workaround this problem by just deleting the pedestal in a different manner... but since this script completely stops, it seems there's a larger problem that truly needs to be addressed. 

This script is attached to a working in-game mannequin replacement.

  • Activate it to get a UIExtensions Listmenu
  • Menu choices are: Show inventory, Change mannequin (body type presets), toggle statue/moving, toggle pedestal tall/short, KILL (remove entirely).

 

Selecting "Change mannequin"

  • gives a UIExtensions Listmenu of preset names
  • disables original
  • places the new
  • transfers the inventory from orig to new
  • deletes original.

 

All mannequins have a pedestal. Above, "delete original" means I delete the pedestal, then delete self, then return.
 
The offending moment comes on line 209, deleting the pedestal before deleting self.
 
I did the registerforupdate to see if the update would run after the lockup. While "change 8" is never output to the console, "5sec update" never comes either... it seems that the script has completely just stopped running for whatever reason.
 
"Sometimes", the output stops at "change 7" but I can continue to activate/use the new mannequin. When I do this, "5sec update" plays, and the old pedestal stays there, dead.
 
"Sometimes", after the stop, I can spawn in new mannequins as if nothing is different,
 
"Sometimes", I can't activeate anything. Other mannequins, and a chest is all i have in the test cell, but neither of them are usable.
 
Secondarily, I have a completely separate script that I made that has a bunch of helper functions... things like press a key to toggle fly/clip mode, move selected references by a relative distance with a simple console command, etc... "sometimes" that helper script is completely gone after this mannequin script stops. As if it never ran in the first place.

notify and conmsg are defined #262. Tehy're basically just typesaver functions for output to console or debug.

This is pretty fucking frustrating as the entire thing works like a charm and is about half the size of the original SPODUM. This one error makes it problematic, leaving dead pedestals everywhere, not to mention the script just outright dying. 
 
I'm also open to some kind of workaround that avoids deleting the pedestal, or even doing some other method for mannequin change.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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