Advertisement
pushrbx

Untitled

Nov 25th, 2013
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class LC_Cube extends KActor placeable;
  2.  
  3. var StaticMeshComponent StaticMesh;
  4.  
  5. simulated function PostBeginPlay()
  6. {
  7.     super.PostBeginPlay();
  8. }
  9.  
  10. event Bump( Actor Other, PrimitiveComponent OtherComp, Vector HitNormal )
  11. {
  12.     `Log( "Actor = " @ Other );
  13.     `Log( "PrimitiveComponent = " @ OtherComp );
  14.     `Log( "Vector = " @ HitNormal );
  15.    
  16.     // make cube pushable
  17.     ApplyImpulse(-HitNormal, 50.0, Other.Location);
  18. }
  19.  
  20. defaultproperties
  21. {
  22.     Begin Object Name = StaticMeshComponent0
  23.                 StaticMesh = StaticMesh'LT_Mech.SM.Mesh.S_LT_Mech_SM_Cratebox02a'
  24.                 //BlockActors = true
  25.                 //BlockNonZeroExtent = true
  26.                 //BlockZeroExtent = true
  27.                 //BlockRigidBody = true
  28.     End Object
  29.    
  30.     StaticMesh = StaticMeshComponent0
  31.     Components.Add(StaticMeshComponent0)
  32.    
  33.     CollisionType=COLLIDE_BlockAll
  34.         bEdShouldSnap=true  // Snap to grid when placing in the editor.
  35.         //bStatic = false // This is a dynamic object.
  36.         //bCollideActors = true // Both of these have to be true to block the player.
  37.         //bBlockActors = true
  38.        
  39.     //BlockRigidBody = true
  40.     Physics = PHYS_Rigidbody
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement