Jump to content

attach() Event Handler


mistythunder
 Share

You are about to reply to a thread that has been inactive for 1110 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

When a prim a script is running in is detached, and the script executes code upon that detachment using attach() event handler, there is a short amount of time the script can still execute code. Is the amount of code that can be executed in that time dependent on sim lag?

Link to comment
Share on other sites

It does seem to be dependant on how much time the simulator has for it. I generally get about two or three lines of code to execute pretty reliably on a detach.

Any code that isn't executed at the time of the detach does execute when the object is reattached, and before the attach event is triggered for the reattachment, so if you can get anything that involves telling the rest of the world goodbye in at the start, and leave any internal tidying up until later, things should go ok. Most of the time.

  • Like 3
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1110 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...