import class StimuliData extends IScriptable
{
}

importonly class AIEvent extends Event
{
	import var name : CName;
	import var timeToLive : Float;

	public import const final function HasTag( tag : CName ) : Bool;
	public import const final function GetTimeToLive() : Float;
}

abstract class AIEvents
{

	public static function ExitVehicleEvent() : AIEvent
	{
		var evt : AIEvent;
		evt = new AIEvent;
		evt.name = 'ExitVehicle';
		return evt;
	}

}

importonly class TaggedAIEvent extends AIEvent
{
	import var tags : array< CName >;

	public import final function AddTag( tag : CName );
}

importonly class SignalEvent extends TaggedAIEvent
{
}

importonly class BaseStimuliEvent extends AIEvent
{
}

import final class StimuliEvent extends BaseStimuliEvent
{
	import var sourcePosition : Vector4;
	import var sourceObject : weak< GameObject >;
	import var stimRecord : weak< Stim_Record >;
	import var radius : Float;
	import var detection : Float;
	import var data : StimuliData;
	import var stimPropagation : gamedataStimPropagation;
	import var stimInvestigateData : stimInvestigateData;
	import var movePositions : array< Vector4 >;
	private import var stimType : gamedataStimType;
	private import var purelyDirect : Bool;
	editable var id : Uint32;

	public function SetStimType( newStimType : gamedataStimType )
	{
		name = EnumValueToName( 'gamedataStimType', ( ( Int32 )( newStimType ) ) );
		stimType = newStimType;
	}

	public const function GetStimType() : gamedataStimType
	{
		return stimType;
	}

	public function SetPurelyDirect( pureDirect : Bool )
	{
		purelyDirect = pureDirect;
	}

	public const function IsPurelyDirect() : Bool
	{
		return purelyDirect;
	}

	public import const function IsTagInStimuli( tag : CName ) : Bool;

	public const function GetStimInterval() : Float
	{
		var interval : Float;
		interval = stimRecord.Interval();
		if( interval <= 0.0 )
		{
			return 1.0;
		}
		return interval;
	}

	public function IsVisual() : Bool
	{
		return stimPropagation == gamedataStimPropagation.Visual;
	}

	public function IsAudio() : Bool
	{
		return stimPropagation == gamedataStimPropagation.Audio;
	}

	public function IsCategory( category : CName ) : Bool
	{
		return stimRecord.Category() == category;
	}

}

importonly class AICommandEvent extends AIEvent
{
	import var command : AICommand;
}

importonly class AICommandStateEvent extends Event
{
	import var command : AICommand;
	import var newState : AICommandState;
}

class StimuliEffectEvent extends Event
{
	var stimuliEventName : CName;
	var targetPoint : Vector4;
}

class SendAIBheaviorReactionStim extends AIbehaviortaskScript
{
	editable var stimToSend : gamedataStimType;

	protected override function Activate( context : ScriptExecutionContext )
	{
		var broadcaster : StimBroadcasterComponent;
		broadcaster = ScriptExecutionContext.GetOwner( context ).GetStimBroadcasterComponent();
		if( broadcaster )
		{
			broadcaster.TriggerSingleBroadcast( ScriptExecutionContext.GetOwner( context ), stimToSend );
		}
	}

}

class StimuliSquadActionEvent extends BaseStimuliEvent
{
	editable var squadActionName : CName;
	editable var squadVerb : EAISquadVerb;

	public function GetDescription() : String
	{
		return ( NameToString( squadActionName ) + " " ) + ( ( String )( squadVerb ) );
	}

}

class LastHitDataEvent extends Event
{
	var hitReactionBehaviorData : HitReactionBehaviorData;
}

class NewHitDataEvent extends Event
{
	var hitIntensity : Int32;
	var hitSource : Int32;
	var hitType : Int32;
	var hitBodyPart : Int32;
	var hitNpcMovementSpeed : Int32;
	var hitDirection : Int32;
	var hitNpcMovementDirection : Int32;
	var stance : Int32;
	var animVariation : Int32;
}

class ForcedHitReactionEvent extends Event
{
	var hitIntensity : Int32;
	var hitSource : Int32;
	var hitType : Int32;
	var hitBodyPart : Int32;
	var hitNpcMovementSpeed : Int32;
	var hitDirection : Int32;
	var hitNpcMovementDirection : Int32;
}

class ForcedDeathEvent extends Event
{
	var hitIntensity : Int32;
	var hitSource : Int32;
	var hitType : Int32;
	var hitBodyPart : Int32;
	var hitNpcMovementSpeed : Int32;
	var hitDirection : Int32;
	var hitNpcMovementDirection : Int32;
	var forceRagdoll : Bool;
}

class ResetFrameDamage extends Event
{
}

