Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Put the destination in the description of the object
- float waittime = 0.1;
- integer unsitting = FALSE;
- default
- {
- state_entry()
- {
- llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION);
- llSetMemoryLimit(llRound((float)llGetUsedMemory() * 1.2));
- }
- changed(integer change)
- {
- if(change & CHANGED_LINK)
- {
- key av = llAvatarOnSitTarget();
- if (av)
- {
- vector mypos = llGetPos();
- if (ZERO_VECTOR == (vector)llGetObjectDesc())
- llOwnerSay("You need to set the position in the descrition of the object.");
- else
- {
- llSetRegionPos((vector)llGetObjectDesc());
- llSleep(waittime);
- }
- llUnSit(av);
- llSleep(waittime);
- llSetRegionPos(mypos);
- unsitting = TRUE;
- }
- else if (unsitting == FALSE)
- llOwnerSay("Don't link me to anything!");
- else
- unsitting = FALSE;
- }
- else if (change & CHANGED_REGION_START)
- {
- llSetMemoryLimit(llRound((float)llGetUsedMemory() * 1.2));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement