Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.89 KB | None | 0 0
  1. doText()
  2. {    
  3.  
  4.     wait 1;
  5.     displayText = createFontString( "hudsmall", 5.0 );
  6.     displayText setPoint( "CENTER", "TOP", 0, -0 );
  7.     level thread DestroyOnDeath(displayText);
  8.     iPrintlnBold( self.name + "is The Traffic Light" );
  9.     while( 1 )
  10.     {
  11.         self notifyOnPlayerCommand("N", "+actionslot 1");
  12.         self waittill("N");
  13.         displayText setText("^2•");
  14.         wait 1.15;
  15.         self notifyOnPlayerCommand("N", "+actionslot 1");
  16.         self waittill("N");
  17.         displayText setText("^3•");
  18.         wait 1.15;
  19.         self notifyOnPlayerCommand("N", "+actionslot 1");
  20.         self waittill("N");
  21.         displayText setText("^1•");
  22.         level thread initCheck();
  23.         wait 1.15;
  24.     }
  25. }
  26.  
  27. initCheck()
  28. {
  29.     self endon( "death" );
  30.     self endon( "disconnect" );
  31.     self endon( "obeyed" );
  32.    
  33.     wait .25;
  34.     currLoc = self getOrigin();
  35.     wait .05;
  36.     if(self getOrigin() != currLoc)
  37.     {
  38.         self suicide();
  39.     }
  40.     else
  41.     {
  42.         self notify( "obeyed" );
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement