//Generated by BehavEd

rem ( "Atlantica Lift 2 - Floor 1 Call Button" );

if ( $get( FLOAT, "lift2_location")$, $=$, $3$ )
{
	rem ( "Deactivate all Call Buttons" );

	affect ( "lift2_floor3trigger", /*@AFFECT_TYPE*/ FLUSH )
	{
		set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "true" );
	}


	affect ( "lift2_floor2trigger", /*@AFFECT_TYPE*/ FLUSH )
	{
		set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "true" );
	}


	affect ( "lift2_floor1trigger", /*@AFFECT_TYPE*/ FLUSH )
	{
		set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "true" );
	}

	rem ( "From Floor 3 to Floor 1" );
	use ( "lift2_path1" );
	set ( "lift2_location", "1" );

	affect ( "lift2_s1", /*@AFFECT_TYPE*/ FLUSH )
	{
		set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "true" );
		move ( $tag( "lift2switch_3_top", ORIGIN)$, 8000.000 );
		wait ( 8000.000 );
	}


	affect ( "lift2_s2", /*@AFFECT_TYPE*/ FLUSH )
	{
		set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "true" );
		move ( $tag( "lift2switch_3_top", ORIGIN)$, 8000.000 );
		wait ( 8000.000 );
	}


	affect ( "lift2", /*@AFFECT_TYPE*/ FLUSH )
	{
		move ( $tag( "lift2_3_top", ORIGIN)$, 8000.000 );
	}

	wait ( 8000.000 );

	affect ( "lift2_s1", /*@AFFECT_TYPE*/ FLUSH )
	{
		move ( $tag( "lift2switch_1_top", ORIGIN)$, 8000.000 );
		wait ( 8000.000 );
	}


	affect ( "lift2_s2", /*@AFFECT_TYPE*/ FLUSH )
	{
		move ( $tag( "lift2switch_1_top", ORIGIN)$, 8000.000 );
		wait ( 8000.000 );
	}


	affect ( "lift2", /*@AFFECT_TYPE*/ FLUSH )
	{
		move ( $tag( "lift2_1_top", ORIGIN)$, 8000.000 );
	}

	wait ( 8000.000 );

	affect ( "lift2_s1", /*@AFFECT_TYPE*/ FLUSH )
	{
		move ( $tag( "lift2switch_1", ORIGIN)$, 8000.000 );
		wait ( 8000.000 );
		set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "false" );
	}


	affect ( "lift2_s2", /*@AFFECT_TYPE*/ FLUSH )
	{
		move ( $tag( "lift2switch_1", ORIGIN)$, 8000.000 );
		wait ( 8000.000 );
		set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "false" );
	}


	affect ( "lift2", /*@AFFECT_TYPE*/ FLUSH )
	{
		move ( $tag( "lift2_1", ORIGIN)$, 8000.000 );
	}

	wait ( 8000.000 );
	use ( "lift2_path1" );
	rem ( "Reactivate all Call Buttons" );

	affect ( "lift2_floor3trigger", /*@AFFECT_TYPE*/ FLUSH )
	{
		set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "false" );
	}


	affect ( "lift2_floor2trigger", /*@AFFECT_TYPE*/ FLUSH )
	{
		set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "false" );
	}


	affect ( "lift2_floor1trigger", /*@AFFECT_TYPE*/ FLUSH )
	{
		set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "false" );
	}

	set ( "lift2_location", "1" );
}


else (  )
{

	if ( $get( FLOAT, "lift2_location")$, $=$, $2$ )
	{
		rem ( "Deactivate all Call Buttons" );

		affect ( "lift2_floor3trigger", /*@AFFECT_TYPE*/ FLUSH )
		{
			set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "true" );
		}


		affect ( "lift2_floor2trigger", /*@AFFECT_TYPE*/ FLUSH )
		{
			set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "true" );
		}


		affect ( "lift2_floor1trigger", /*@AFFECT_TYPE*/ FLUSH )
		{
			set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "true" );
		}

		rem ( "From Floor 2 to Floor 1" );
		use ( "lift2_path3" );
		set ( "lift2_location", "1" );

		affect ( "lift2_s1", /*@AFFECT_TYPE*/ FLUSH )
		{
			set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "true" );
			move ( $tag( "lift2switch_3_bottom", ORIGIN)$, 8000.000 );
			wait ( 8000.000 );
		}


		affect ( "lift2_s2", /*@AFFECT_TYPE*/ FLUSH )
		{
			set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "true" );
			move ( $tag( "lift2switch_3_bottom", ORIGIN)$, 8000.000 );
			wait ( 8000.000 );
		}


		affect ( "lift2", /*@AFFECT_TYPE*/ FLUSH )
		{
			move ( $tag( "lift2_3_bottom", ORIGIN)$, 8000.000 );
		}

		wait ( 8000.000 );

		affect ( "lift2_s1", /*@AFFECT_TYPE*/ FLUSH )
		{
			move ( $tag( "lift2switch_1", ORIGIN)$, 8000.000 );
			wait ( 8000.000 );
			set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "false" );
		}


		affect ( "lift2_s2", /*@AFFECT_TYPE*/ FLUSH )
		{
			move ( $tag( "lift2switch_1", ORIGIN)$, 8000.000 );
			wait ( 8000.000 );
			set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "false" );
		}


		affect ( "lift2", /*@AFFECT_TYPE*/ FLUSH )
		{
			move ( $tag( "lift2_1", ORIGIN)$, 8000.000 );
		}

		wait ( 8000.000 );
		use ( "lift2_path3" );
		rem ( "Reactivate all Call Buttons" );

		affect ( "lift2_floor3trigger", /*@AFFECT_TYPE*/ FLUSH )
		{
			set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "false" );
		}


		affect ( "lift2_floor2trigger", /*@AFFECT_TYPE*/ FLUSH )
		{
			set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "false" );
		}


		affect ( "lift2_floor1trigger", /*@AFFECT_TYPE*/ FLUSH )
		{
			set ( /*@SET_TYPES*/ "SET_INACTIVE", /*@BOOL_TYPES*/ "false" );
		}

		set ( "lift2_location", "1" );
	}

}

