@LabelIndex 101485
@StringIndex 0
class 0 door_detect_trap : default_trap {
parameter:
	int	show_created = 1;
	int	show_detected = 0;
	int	show_activated = 0;
	int	show_step_in = 0;
	int	show_step_out = 0;
	int	show_defused = 1;
	string	DoorName = "door_detect_trap_default";
	int	DoorCloseTime = 0;

handler:
	EventHandler TRAP_DEFUSED(i0) {
		if( IsDefused == 1 ) {
			myself::SetWorldTrapVisibleByClassId(myself.sm.class_id,show_detected);
			gg::Castle_GateOpenClose2(DoorName,0);
			myself::AddTimerEx(1002,( DoorCloseTime * 1000 ));
		}
		myself::AddTimerEx(1001,( timer * 1000 ));
	}

	EventHandler TIMER_FIRED_EX(timer_id) {
		if( timer_id == 1002 ) {
			gg::Castle_GateOpenClose2(DoorName,1);
		}
		super;
	}

}
