;Alan's slide script ;Makes a user put on a new av and slide across the room. ;Then restores the users prop and returns them to where they were. ON ENTER { ;save_position - save my current position save_position GLOBAL { savedx GLOBAL savedy GLOBAL POSX savedx = POSY savedy = } save_position DEF ;restore_position - restore saved position restore_position GLOBAL { savedx GLOBAL savedy GLOBAL savedx savedy SETPOS } restore_position DEF ;save_props - save currently worn props save_props GLOBAL { saved_prop GLOBAL "[ " p = 0 i = { p i USERPROP ITOA & " " & p = i ++ } { i NBRUSERPROPS < } WHILE p " ]" & saved_prop = } save_props DEF ;restore_props - restore saved prop restore_props GLOBAL { saved_prop GLOBAL { NAKED } { saved_prop STRTOATOM EXEC SETPROPS} "[ ]" saved_prop == IFELSE } restore_props DEF } ON SELECT { step GLOBAL 0 step = save_position GLOBAL save_position EXEC save_props GLOBAL save_props EXEC [ 955006835 ] SETPROPS 6 ME SETALARM } ON ALARM { step GLOBAL ;************************************************* ;Set slide location parameters and number of steps. 100 start_x = 100 start_y = 300 stop_x = 300 stop_y = 15 nbr_steps = ;************************************************* stop_x start_x - range_x = stop_y start_y - range_y = ; ;Move the person. Multiply before divide to reduce error! ; { start_x range_x step * nbr_steps / + start_y range_y step * nbr_steps / + SETPOS step ++ 6 ME SETALARM } { restore_position GLOBAL restore_position EXEC restore_props GLOBAL restore_props EXEC } step nbr_steps < IFELSE }