Advertisement
Gayngel

State Change in User Defined Function

Feb 8th, 2022 (edited)
2,529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. stateChange() {
  2.     if (TRUE)
  3.         state foo;
  4. }
  5.  
  6. default {
  7.             state_entry()
  8.             {
  9.        
  10.              llSay(0,"I'm in state default! Touch me to go to state foo.");
  11.  
  12.             }
  13.        
  14.             touch_end(integer num)
  15.             {
  16.                 stateChange();
  17.             }
  18. }
  19.  
  20. state foo {
  21.              state_entry()
  22.             {
  23.        
  24.              llSay(0,"I'm in state foo! Touch me to go bac to state default.");
  25.  
  26.             }
  27.  
  28.          
  29.             touch_end(integer num)
  30.             {
  31.                 state default;
  32.             }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement