class CheckQuestFact extends AIbehaviorconditionScript
{
	editable var m_questFactName : CName;
	editable var m_comparedValue : Int32;
	editable var m_comparator : ECompareOp;

	protected export override function Activate( context : ScriptExecutionContext )
	{
		SetUpdateInterval( context, RandomizeOffsetForUpdateInterval( 0.30000001 ) );
	}

	protected override function Check( context : ScriptExecutionContext ) : AIbehaviorConditionOutcomes
	{
		var factValue : Int32;
		factValue = GameInstance.GetQuestsSystem( ScriptExecutionContext.GetOwner( context ).GetGame() ).GetFact( m_questFactName );
		return Compare( m_comparator, factValue, m_comparedValue );
	}

}

