Results 1 to 10 of 32

Thread: Timed Door

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Code:
    main()
    {
    	door1= getent( "lol1", "targetname" );
    	door2= getent( "lol2", "targetname" );
    	t = 0;
    
    	while( true )
    	{
    		if( t == 10 )
    		{
    			door1 rotateyaw( 90, 2 );
    			door2 rotateyaw( -90, 2 );
    			door2 waittill( "rotatedone" );
    			iPrintInBold( "Castle Opened!" );
    		}
    		
    		t++;
    		
    		wait 10;
    	}
    }
    You do know that once the doors are open, the loop will carry on? The doors will keep rotating their yaw again and again and again. If you only want them to open once, you need to break from the loop once done.
    Last edited by Tally; 7th March 2014 at 20:17.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •