<?xml version="1.0" ?>

<Scene name="HouseoutPorch">
	<Audio source="mildred_music"/>

	<Action type="SetActionMap" amp="HouseoutPorch"/>

	<Action type="SetVar" var="task14_goto_mildred" value="2" reset="0"/>
	<Action type="SetVar" var="task15_find_mothers_letter" value="1" reset="0"/>

    <Object type="HiddenObject" name="spatula_porch_visible" item="spatula_porch" image="HO_spatula_porch" x="509" y="464" />

	<Object type="ImageBox" image="ANIM_tree" x="435" y="60" center_x="593" reset_animators="0">
		<Animator type="Rotator" periods="-1" function="sine" amplitude="1" speed="0.15"/>
	</Object>

	<if t="$houseout_fog_off == 0">
		<Object type="ImageBox" image="ANIM_fog" x="-133" y="520" alpha="200" scale_x="1.5" reset_animators="0">
			<Animator type="MoverY" periods="-1" speed="3"/>
			<Animator type="ScalerX" periods="-1" speed="0.25"/>
		</Object>

		<Object type="ImageBox" image="ANIM_fog" x="133" y="520" alpha="200" scale_x="1.5" reset_animators="0">
			<Animator type="MoverY" periods="-1" speed="5"/>
			<Animator type="ScalerX" periods="-1" speed="0.25"/>
		</Object>

		<Object type="ImageBox" image="ANIM_fog" x="333" y="520" alpha="200" scale_x="1.5" reset_animators="0">
			<Animator type="MoverY" periods="-1" speed="25"/>
			<Animator type="ScalerX" periods="-1" speed="0.25"/>
		</Object>

		<Object type="ImageBox" image="ANIM_fog" x="533" y="520" alpha="200" scale_x="1.5" reset_animators="0">
			<Animator type="MoverY" periods="-1" speed="12"/>
			<Animator type="ScalerX" periods="-1" speed="0.25"/>
		</Object>
	</if>


	<Action condition="not $hop_dirt_digged == 2" color="00FFFF" type="ItemAction" cursor="look">
		<Action itemaction="any" type="SetVar" var="hop_zoom" value="1"/>
	</Action>

	<if t="$mildred_house_unlocked == 0">
		<Action color="00FF00" type="ItemAction" cursor="look">
			<Action itemaction="noitem" type="Composite">
				<Action type="PlaySound" sound="drawer_locked"/>
				<Action type="Say" key="MILDRED_LOCKED"/>
			</Action>
			<Action itemaction="big_key" type="Composite">
				<Action type="RemoveItem" item="big_key" reset="0"/>
				<Action type="PlaySound" sound="door_unlock"/>
				<Action type="PlaySound" sound="door"/>
				<Action type="SwitchScene" scene="HallDark"/>
				<Action type="SetVar" var="mildred_house_unlocked" value="1" reset="0"/>
			</Action>
		</Action>
	<else>
		<Action color="00FF00" type="Composite" cursor="walk">
			<Action type="PlaySound" sound="door"/>
			<Action condition="not $fusebox_solved and $ho_flashlight_visible" type="SwitchScene" scene="HallDark"/>
			<Action condition="not $fusebox_solved and not $ho_flashlight_visible" type="SwitchScene" scene="HallFlashlight"/>
			<Action condition="$fusebox_solved" type="SwitchScene" scene="HallLight"/>
		</Action>
	</else>
	</if>

	<Action color="FF0000" type="Say" key="LOOK_HOP_LIGHTED_AREA" cursor="look"/>


<!-- #####ZOOM##### -->
	<if t="$hop_zoom != 0">
<!-- ZOOM objekt -->
		<Object type="ImageBox" image="0x00000099" x="0" y="0" name="hop_zoom_container" alpha="255" w="1024" h="768" />
		<Object type="ImageBox" image="0003_SCENE_houseoutporch_zoom" x="228" y="140" name="hop_zoom" parent="hop_zoom_container" center_x="650" center_y="400"/>

<!-- objekti na ZOOM-u -->
		<if t="$hop_dirt_digged } 0">
			<Object type="ImageBox" image="0002_SCENE_dirt" x="152" y="161" parent="hop_zoom" alpha="255"/>
			<if t="$hop_dirt_digged != 2">
				<Object type="ImageBox" image="0001_HO_key_mildred" x="192" y="206" parent="hop_zoom" alpha="255"/>
			</if>
		</if>
		<if t="$hop_dirt_digged == -1">
			<Object type="ImageBox" image="0002_SCENE_dirt" x="152" y="161" parent="hop_zoom" alpha="0">
				<Animator type="AlphaChanger" amplitude="255" speed="1"/>
			</Object>
			<Object type="ImageBox" image="0001_HO_key_mildred" x="192" y="206" parent="hop_zoom" alpha="0">
				<Animator type="AlphaChanger" amplitude="255" speed="1"/>
			</Object>
			<Action type="SetVar" var="hop_dirt_digged" value="1" reset="0"/>
		</if>

<!-- akcije na ZOOM-u -->
		<if t="$hop_zoom } 0">
			<Action type="SetActionMap" amp="HouseoutPorch_zoom"/>
			<if t="$hop_dirt_digged == 0">
				<Action color="FF66FF" type="ItemAction" cursor="look">
					<Action itemaction="noitem" type="Say" key="HOP_DIRT"/>
					<Action itemaction="spatula_porch" type="Composite">
						<Action type="RemoveItem" item="spatula_porch" reset="0"/>
						<Action type="PlaySound" sound="moss_removed"/>
						<Action type="SetVar" var="hop_dirt_digged" value="-1"/>
					</Action>
				</Action>
			<else>
				<Action condition="$hop_dirt_digged != 2" color="FF66FF" type="Composite" cursor="use">
					<Action type="AddItem" item="big_key" reset="0"/>
					<Action type="SetVar" var="hop_dirt_digged" value="2"/>
				</Action>
			</else>
			</if>
		</if>

<!-- ZOOM out action -->
        <if t="$hop_zoom } 0">
            <Action color="666666" sparkle="0" type="Composite">
                <Action type="SetVar" var="hop_zoom" value="-1"/>
            </Action>
        </if>

<!-- ZOOM fade animatori -->
        <if t="$hop_zoom == 1">
            <Animator type="AlphaChanger" periods="0.25" function="sine" offset="0" amplitude="255" speed="0.7" parent="hop_zoom_container"/>
            <Animator type="ScalerX" periods="0.25" function="sine" offset="0" amplitude="1.0" speed="0.7" parent="hop_zoom"/>
            <Animator type="ScalerY" periods="0.25" function="sine" offset="0" amplitude="1.0" speed="0.7" parent="hop_zoom"/>
            <Action type="SetVar" var="hop_zoom" value="2" reset="0"/>
        </if>

        <if t="$hop_zoom == -1">
            <Animator type="AlphaChanger" periods="0.25" function="sine" offset="255" amplitude="-255" speed="0.7" parent="hop_zoom_container"/>
            <Animator type="ScalerX" periods="0.25" function="sine" offset="1" amplitude="-1.0" speed="0.7" parent="hop_zoom"/>
            <Animator type="ScalerY" periods="0.25" function="sine" offset="1" amplitude="-1.0" speed="0.7" parent="hop_zoom"/>
            <Action type="SetVar" var="hop_zoom" value="0" reset="0"/>
        </if>
	</if>



</Scene>