Create a "pre teleport" script event
tracked
Toothless Draegonne
This is a suggestion to implement an event that would trigger before a requested teleport runs. If a script attached to an agent implements the event, there will be a one second delay before the requested teleport initiates, in order to allow the script to perform some small actions.
Grief potential would be small, since a griefer could just use current scripts to drop something malicious and then teleport easily enough. However an actual event would allow people to use normal viewer teleports and have them effectively intercepted by magic effects, data save routines, hiding avatar parts before teleport and other such features.
Log In

SL Feedback
updated the status to
tracked
Issue tracked. We have no estimate when it may be implemented. Please see future updates here.
Jenna Felton
An interesting idea. Maybe instead a fixed 1 second delay the region would wait until every script having the event finished handling it and only when it takes too long (a few seconds) issue the teleport interrupting the event that took too long.
Edit: Additional note.
I'd like to suggest that the event would provide the target region name and the event would be only issued when the teleport is actually possible. When the teleport was aborted because of a check happened after the event triggered. Maybe the same event must trigger again signalling the teleport was aborted.
This would allow scripts to correctly prepare the attachment, for example to hide something inappropriate at the target region before the teleport started and not after the teleport finished and the script detects it has to take an urgent action.
When the teleport was aborted (I believe CHANGED_TELEPORT would not trigger then) the scripts would not know they are still on the region and they have to revert the action they taken.
This way you can for example show a portal the avatar steps into before the teleport starts, the portal would arrive with the avatar (because attached) and the avatar would step out of it. But when the teleport was aborted (for example parcel not allows entering) the script would hide the portal and stop animation.
Toothless Draegonne
Jenna Felton Yes that's the general idea. One second is a suggestion for the grace period, I'm sure testing can find an optimal value.