Guest User

Untitled

a guest
Dec 2nd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This is the automatic state to execute.
  2. auto state Idle
  3. {
  4.    // When touched by another actor...
  5.    function Touch( actor Other )
  6.    {
  7.       log( "I was touched, so I'm going to Attacking" );
  8.       GotoState( 'Attacking' );
  9.       Log( "I have gone to the Attacking state" );
  10.    }
  11. Begin:
  12.    log( "I am idle..." );
  13.    sleep( 10 );
  14.    goto 'Begin';
  15. }
  16.  
  17. // Attacking state.
  18. state Attacking
  19. {
  20. Begin:
  21.    Log( "I am executing the attacking state code" );
  22.    //...
  23. }
Add Comment
Please, Sign In to add comment