Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UnrealShare.ArrowSpawner


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
//=============================================================================
// ArrowSpawner.
//=============================================================================
class ArrowSpawner extends Effects;

var() float TriggerDelay, RepeatDelay;
var() int ArrowsToShootAfterDeactivated;
var() int ArrowSpeed;
var int ArrowCount;

function Trigger( actor Other, pawn EventInstigator )
{
	Instigator = EventInstigator;
	GoToState('Active');
}
state Active
{
	function Trigger( actor Other, pawn EventInstigator);

	function UnTrigger( actor Other, pawn EventInstigator )
	{
		ArrowCount = ArrowsToShootAfterDeactivated;
		if (ArrowCount<1) ArrowCount = 1;
	}
	function Timer()
	{
		local Arrow a;

		If (ArrowCount > 0)
		{
			If (ArrowCount==1)
			{
				SetTimer(0.0, False);
				GoToState('');
			}
			a = Spawn(class'Arrow',, '', Location+Vector(Rotation)*20);
			a.Speed = ArrowSpeed;
			ArrowCount--;
		}
		else
		{
			a = Spawn(class'Arrow',,, Location+Vector(Rotation)*20);
			a.Speed = ArrowSpeed;
			SetTimer(RepeatDelay, True);
		}
	}
Begin:
	ArrowCount = 0;
	SetTimer(TriggerDelay, True);
}

defaultproperties
{
				TriggerDelay=0.100000
				RepeatDelay=0.500000
				ArrowsToShootAfterDeactivated=1
				ArrowSpeed=1000
				bHidden=True
				bNetTemporary=False
				bDirectional=True
				DrawType=DT_Sprite
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: zo 11-11-2012 21:10:28.000 - Creation time: zo 11-11-2012 21:14:17.428 - Created with UnCodeX