UDN
Search public documentation:
DevelopmentKitGemsForLoopKismetNode
日本語訳
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
UE3 Home > Unreal Development Kit Gems > Creating a For Loop Kismet node
UE3 Home > Kismet Visual Scripting > Creating a For Loop Kismet node
UE3 Home > Kismet Visual Scripting > Creating a For Loop Kismet node
Creating a For Loop Kismet node
Last tested against UDK Apr, 2011
PC and iOS compatible
Overview
Unrealscript
class SeqAct_ForLoop extends SequenceAction; // The number to use as the start of the loop var() int Start; // The number to use as the end of the loop var() int End; // How much to increment the for loop by. Always use a positive number var() int Increment; // Include end when iterating var() bool IncludeEnd; // Index output in case it is useful for level designers var int Index; // Internal index var int InternalIndex; // Has the internal index been set before? var bool HasSetInternalIndex; event Activated() { // Check if we have a range to iterate over if (Start == End || Increment <= 0) { return; } if (!HasSetInternalIndex) { InternalIndex = Start; HasSetInternalIndex = true; } if (Start < End) { Index = InternalIndex; if (InternalIndex < End || (IncludeEnd && InternalIndex <= End)) { ActivateOutputLink(0); InternalIndex += Increment; } else { InternalIndex = Start; } } else if (Start > End) { Index = InternalIndex; if (InternalIndex > End || (IncludeEnd && InternalIndex >= End)) { ActivateOutputLink(0); InternalIndex -= Increment; } else { InternalIndex = Start; } } } defaultproperties { Increment=1 InternalIndex=0 bAutoActivateOutputLinks=false HasSetInternalIndex=false ObjName="For Loop" ObjCategory="Misc" InputLinks(0)=(LinkDesc="In") OutputLinks(0)=(LinkDesc="Out") VariableLinks.Empty VariableLinks(0)=(ExpectedType=class'SeqVar_Int',LinkDesc="Start",PropertyName=Start) VariableLinks(1)=(ExpectedType=class'SeqVar_Int',LinkDesc="End",PropertyName=End) VariableLinks(2)=(ExpectedType=class'SeqVar_Int',LinkDesc="Increment",bHidden=true,PropertyName=Increment) VariableLinks(3)=(ExpectedType=class'SeqVar_Int',LinkDesc="Index",bWriteable=true,PropertyName=Index) }