Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 |
//============================================================================= // used to force UDKVehicles [of a certain class if wanted] in a certain direction // // Copyright 1998-2011 Epic Games, Inc. All Rights Reserved. //============================================================================= class UDKForcedDirectionVolume extends PhysicsVolume placeable native; /** Allows the ForceDirectionVolume to be limited to certain types of vehicles */ var() class<UDKVehicle> TypeToForce; /** If true, doesn't affect hoverboards */ var() bool bIgnoreHoverboards; /** For editing - specifies the forced direction */ var() const ArrowComponent Arrow; /** if the vehicle is being affected by a force volume with this flag set, the player cannot exit the vehicle. */ var() bool bDenyExit; /** Whether non-vehicle pawns should be blocked by this volume */ var() bool bBlockPawns; /** Whether spectators should be blocked by this volume. */ var() bool bBlockSpectators; /** Direction arrow is pointing */ var vector ArrowDirection; /** Array of vehicles currently touching this volume */ var array<UDKVehicle> TouchingVehicles; cpptext { virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent); UBOOL IgnoreBlockingBy( const AActor *Other ) const; virtual void TickSpecial(FLOAT DeltaSeconds ); } simulated function PostBeginPlay() { super.PostBeginPlay(); if ( !bBlockSpectators && (BrushComponent != None) ) { BrushComponent.SetTraceBlocking(false,true); } } event ActorEnteredVolume(Actor Other) { if ( PlayerController(Other) != None ) { Other.FellOutOfWorld(None); } } simulated event Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal ) { local UDKVehicle V; Super.Touch(Other, OtherComp, HitLocation, HitNormal); V = UDKVehicle(Other); if ((V != None) && ClassIsChildOf(V.Class, TypeToForce) && V.OnTouchForcedDirVolume(self)) { TouchingVehicles.AddItem(V); if (bDenyExit) { V.bAllowedExit = false; } } } simulated event UnTouch(Actor Other) { local bool bInAnotherVolume; local UDKForcedDirectionVolume AnotherVolume; if (ClassIsChildOf(Other.class, TypeToForce)) { TouchingVehicles.RemoveItem(UDKVehicle(Other)); if (bDenyExit) { foreach Other.TouchingActors(class'UDKForcedDirectionVolume', AnotherVolume) { if (AnotherVolume.bDenyExit) { bInAnotherVolume = true; break; } } if (!bInAnotherVolume) { UDKVehicle(Other).bAllowedExit = UDKVehicle(Other).default.bAllowedExit; } } } } simulated function bool StopsProjectile(Projectile P) { return false; } defaultproperties { Begin Object Class=ArrowComponent Name=AC ArrowColor=(R=150,G=100,B=150) ArrowSize=5.0 AbsoluteRotation=true bDisableAllRigidBody=false End Object Components.Add(AC) Arrow=AC TypeToForce=class'UDKVehicle' Begin Object Name=BrushComponent0 CollideActors=true BlockActors=true BlockZeroExtent=true BlockNonZeroExtent=true BlockRigidBody=TRUE RBChannel=RBCC_Untitled4 End Object bPushedByEncroachers=FALSE bMovable=FALSE bWorldGeometry=false bCollideActors=true bBlockActors=true bBlockSpectators=true bStatic=false bNoDelete=true } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |