Announcement

Collapse
No announcement yet.

How can I make a fast moving rigid body kill the player? (only while moving at speed)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by maui2007 View Post
    Here is a code snippet of a quick attachment kismet as well as a snippet to show volumes in game to help you debug your problem as well. Just copy and paste the code into your kismet.

    Code:
    Begin Object Class=SeqEvent_LevelLoaded Name=SeqEvent_LevelLoaded_0
       MaxWidth=136
       OutputLinks(0)=(Links=((LinkedOp=SeqAct_AttachToActor'SeqAct_AttachToActor_0'),(LinkedOp=SeqAct_ConsoleCommand'SeqAct_ConsoleCommand_0')),DrawY=261)
       OutputLinks(1)=(DrawY=282)
       OutputLinks(2)=(DrawY=303)
       ObjInstanceVersion=3
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=136
       ObjPosY=192
       DrawWidth=137
       DrawHeight=89
       Name="SeqEvent_LevelLoaded_0"
       ObjectArchetype=SeqEvent_LevelLoaded'Engine.Default__SeqEvent_LevelLoaded'
    End Object
    Begin Object Class=SeqAct_AttachToActor Name=SeqAct_AttachToActor_0
       bHardAttach=False
       bUseRelativeOffset=True
       bUseRelativeRotation=True
       InputLinks(0)=(DrawY=194)
       OutputLinks(0)=(DrawY=194)
       VariableLinks(0)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_0'),DrawX=398)
       VariableLinks(1)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_1'),DrawX=475)
       ObjInstanceVersion=2
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=360
       ObjPosY=160
       ObjComment="Attach volume to object"
       DrawWidth=170
       DrawHeight=61
       Name="SeqAct_AttachToActor_0"
       ObjectArchetype=SeqAct_AttachToActor'Engine.Default__SeqAct_AttachToActor'
    End Object
    Begin Object Class=SeqVar_Object Name=SeqVar_Object_0
       ObjValue=KActor'KActor_0'
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=368
       ObjPosY=248
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Object_0"
       ObjectArchetype=SeqVar_Object'Engine.Default__SeqVar_Object'
    End Object
    Begin Object Class=SeqVar_Object Name=SeqVar_Object_1
       ObjValue=DynamicPhysicsVolume'DynamicPhysicsVolume_0'
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=448
       ObjPosY=248
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Object_1"
       ObjectArchetype=SeqVar_Object'Engine.Default__SeqVar_Object'
    End Object
    Begin Object Class=SeqAct_ConsoleCommand Name=SeqAct_ConsoleCommand_0
       Commands(0)="show VOLUMES"
       InputLinks(0)=(DrawY=378)
       OutputLinks(0)=(DrawY=378)
       VariableLinks(0)=(LinkedVariables=(SeqVar_Player'SeqVar_Player_0'),DrawX=416)
       ObjInstanceVersion=2
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=352
       ObjPosY=344
       ObjComment="Show volumes in game"
       DrawWidth=129
       DrawHeight=61
       Name="SeqAct_ConsoleCommand_0"
       ObjectArchetype=SeqAct_ConsoleCommand'Engine.Default__SeqAct_ConsoleCommand'
    End Object
    Begin Object Class=SeqVar_Player Name=SeqVar_Player_0
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=376
       ObjPosY=432
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Player_0"
       ObjectArchetype=SeqVar_Player'Engine.Default__SeqVar_Player'
    End Object
    Also, when you get a collision you could base the damage done based off the value you get from a "Get Velocity" kismet function.
    Thanks a lot man! I'll try this out tomorrow or soon as I can, now i need to kip. The volume thing will be a great help for debugging though!

    peace

    Leave a comment:


  • replied
    Here is a code snippet of a quick attachment kismet as well as a snippet to show volumes in game to help you debug your problem as well. Just copy and paste the code into your kismet.

    Code:
    Begin Object Class=SeqEvent_LevelLoaded Name=SeqEvent_LevelLoaded_0
       MaxWidth=136
       OutputLinks(0)=(Links=((LinkedOp=SeqAct_AttachToActor'SeqAct_AttachToActor_0'),(LinkedOp=SeqAct_ConsoleCommand'SeqAct_ConsoleCommand_0')),DrawY=261)
       OutputLinks(1)=(DrawY=282)
       OutputLinks(2)=(DrawY=303)
       ObjInstanceVersion=3
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=136
       ObjPosY=192
       DrawWidth=137
       DrawHeight=89
       Name="SeqEvent_LevelLoaded_0"
       ObjectArchetype=SeqEvent_LevelLoaded'Engine.Default__SeqEvent_LevelLoaded'
    End Object
    Begin Object Class=SeqAct_AttachToActor Name=SeqAct_AttachToActor_0
       bHardAttach=False
       bUseRelativeOffset=True
       bUseRelativeRotation=True
       InputLinks(0)=(DrawY=194)
       OutputLinks(0)=(DrawY=194)
       VariableLinks(0)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_0'),DrawX=398)
       VariableLinks(1)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_1'),DrawX=475)
       ObjInstanceVersion=2
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=360
       ObjPosY=160
       ObjComment="Attach volume to object"
       DrawWidth=170
       DrawHeight=61
       Name="SeqAct_AttachToActor_0"
       ObjectArchetype=SeqAct_AttachToActor'Engine.Default__SeqAct_AttachToActor'
    End Object
    Begin Object Class=SeqVar_Object Name=SeqVar_Object_0
       ObjValue=KActor'KActor_0'
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=368
       ObjPosY=248
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Object_0"
       ObjectArchetype=SeqVar_Object'Engine.Default__SeqVar_Object'
    End Object
    Begin Object Class=SeqVar_Object Name=SeqVar_Object_1
       ObjValue=DynamicPhysicsVolume'DynamicPhysicsVolume_0'
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=448
       ObjPosY=248
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Object_1"
       ObjectArchetype=SeqVar_Object'Engine.Default__SeqVar_Object'
    End Object
    Begin Object Class=SeqAct_ConsoleCommand Name=SeqAct_ConsoleCommand_0
       Commands(0)="show VOLUMES"
       InputLinks(0)=(DrawY=378)
       OutputLinks(0)=(DrawY=378)
       VariableLinks(0)=(LinkedVariables=(SeqVar_Player'SeqVar_Player_0'),DrawX=416)
       ObjInstanceVersion=2
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=352
       ObjPosY=344
       ObjComment="Show volumes in game"
       DrawWidth=129
       DrawHeight=61
       Name="SeqAct_ConsoleCommand_0"
       ObjectArchetype=SeqAct_ConsoleCommand'Engine.Default__SeqAct_ConsoleCommand'
    End Object
    Begin Object Class=SeqVar_Player Name=SeqVar_Player_0
       ObjInstanceVersion=1
       ParentSequence=Sequence'Main_Sequence'
       ObjPosX=376
       ObjPosY=432
       DrawWidth=32
       DrawHeight=32
       Name="SeqVar_Player_0"
       ObjectArchetype=SeqVar_Player'Engine.Default__SeqVar_Player'
    End Object
    Also, when you get a collision you could base the damage done based off the value you get from a "Get Velocity" kismet function.

    Leave a comment:


  • replied
    Sadly I can't think of an uncomplicated way of doing this you could however make a boulder
    that is a skeletal mesh and set the weight of that mesh to be enough to kill you from a certain height like they did with the vehicles and such. :P

    Leave a comment:


  • replied
    Interesting level name.
    You've got kismet AND the volume causing damage?
    Attach the touch instigator and the modify health target to the same empty object variable. Leave instigator blank. Attach the physics volume to the kactor, not the other way round. Check the physicsvolume is on phys-interpolating or phys-none (i forget which).
    Might fix it, might not

    Can't you use touch event off the physobject instead of a volume anyway?

    Leave a comment:


  • replied
    Originally posted by Jagnot View Post
    Could you attach a DynamicPhysicsVolume to each boulder?
    Thanks, I'll give it a try right now!

    Well I think its attaching, because the green box (i remember it from UT3ed) appears around the volume/rigid body. However, I've setup the properties of the volume as:-

    -Damage Per Sec=100
    -Destructive=Yes
    -Entry Pain= Yes (just for testing)
    -Causes Pain=Yes
    -Pain Interval= 0 (for instant pain)
    -Damage Type= Instagib (for added violence)

    After this, I positioned the boulder above the players head, but when it lands on me, I just get bounced away and my health is unaffected.

    Is there a way I can set the volume to be drawn in-game and not just the editor (then I would know for sure if its really attaching)

    Thanks for getting me closer to my goal!

    Edit: No, its just not working at all. I've tried it manually, AND through Kismet, and even a combination of the two, but nothing happens. Heres a screenshot of my progress:-

    Here is a shot of my Kismet version of the attempt:


    Here are the properties of the TOUCHED variable:-


    Here are the properties of the Modify Health action:-


    These are the properties of the actors (editor only, outside of Kismet):-

    Dynamic Phys Vol:


    K actor:


    Finally a shot of how the thing looks:-


    I dont know what else to try, except to turn on some dub music and blaze one.

    hopefully somebody can point out the shortcomings here

    THANKS

    Leave a comment:


  • replied
    Could you attach a DynamicPhysicsVolume to each boulder?

    Leave a comment:


  • How can I make a fast moving rigid body kill the player? (only while moving at speed)

    EZ, for my practice map I've got a section where 5 massive boulders fall out the sky like death from above, but the only problem is, they just bounce off you and push you around a bit. I'd like to make it so when the boulder hits you, your pretty much dead, unless the boulder has alread hit the floor and slowed down considerably, in which case it just damages you a bit.

    Is there some way I can make the collision between the player and the boulders life threatening, with the damage taken increased according to the velocity of the object? I've tried a lot of different Kismet sequence experiments, but none of them are having the desired effect.

    Thanks in advance!

    peace
Working...
X