Shrapnel Bomb (gib collision)?

Got problems with your models? Struggling with textures? Get help with your custom assets.

Shrapnel Bomb (gib collision)?

Postby skankdragon on Fri Jun 22, 2012 12:00 am

Hey there. I am stumped.

I'm working on a custom model with custom gibs, but I seem to have run into a bit of a wall. Let me explain what I'm trying to do.

I'm working on a fort-style map where the fort is under fire from flaming ballista arrows and catapults. The ballistas I have working no problem, but I am having a bit of an issue with the catapult ammunition.

The catapult shells/rocks are supposed to impact, explode, and send shrapnel flying in every direction. I actually was able to get this to work after a few days of toil.

The shells fly in, explode and send shrapnel flying everywhere, the only problem is that the shrapnel doesn't collide with the player.

Essentially I made it so when the shell model breaks on impact, shrapnel gibs spawn with the inherited speed and direction of the shell. They collide fine with the world, but I need them to collide with the players.

Here's the QC for the main shell:

Code: Select all
$modelname "sd_defball"
$scale 1
$staticprop
$cdmaterials "models\woodfort"

$surfaceprop "metal"

$keyvalues
{
   prop_data
   {
      health          1
 
   }
}

$body "Body" "sd_defball_ref.SMD"

$sequence "Idle" "E:\Users\Sporkwhistle\Desktop\Defense Ball (MDL)\sd_defball_ref.SMD" fps 30 ACT_IDLE 1

$collisionmodel "E:\Users\Sporkwhistle\Desktop\Defense Ball (MDL)\sd_defball_phys.SMD"
{
   $concave
   $mass 600

}

   $collisiontext
   {
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25" "offset" "5 0 0 0"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25" "offset" "4 4 0 0"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   break
       {
           "model" "sd_defball_gib.mdl" "fadetime" "10" "burst" "25"
       }
   }


Here's the QC for the shrapnel:

Code: Select all
$modelname "sd_defball_gib"
$scale 1
$staticprop
$cdmaterials "models\woodfort"

$surfaceprop "metal"

$keyvalues
{
   prop_data
   {
      dmg.bullets      0
      explosive_damage    50
      explosive_radius   128

            fire_interactions
            {
         explosive_resist   yes
              ignite      halfhealth
              flammable          yes
           }
 
   }
}

$body "Body" "sd_defball_gib_ref.SMD"

$sequence "Idle" "E:\Users\Sporkwhistle\Desktop\Defense Ball (MDL)\sd_defball_gib_ref.SMD" fps 30 ACT_IDLE 1

$collisionmodel "E:\Users\Sporkwhistle\Desktop\Defense Ball (MDL)\sd_defball_gib_phys.SMD"
{
   $concave
   $mass 150

}



Is there any way to make the shrapnel collide with the player? Or is it hard-coded into source that gibs don't collide with the player? Also, is there any way to get exploding or flaming gibs working? I can't seem to pull it off.

Thanks!


EDIT: I was wondering if there was any way to get the ballista arrows to stick into the walls of the fort? Is there any keyvalue or setting available for this in source?
skankdragon
Dumpling
Dumpling
 
Joined: Sat Dec 10, 2011 12:55 am

Re: Shrapnel Bomb (gib collision)?

Postby Jangalomph on Fri Jun 22, 2012 4:22 am

You could always fake it with just a damage radius, instead of having damaging shrapnel. I guess you could code something to send a "bullet" to hit the player simulating a fragment. Or parent the "invisible bullet" to a shrapnel gib faking a hit.
http://www.nomoreroominhell.com
I don’t know whether I was right or wrong, I guess I’ll never know… But I made it. And I guess I should be thankful for that. - Strelok
Has anyone really been far even as decided to use even go want to do look more like?
User avatar
Jangalomph
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Wed Jun 25, 2008 3:19 pm
Location: Sumter, SC

Re: Shrapnel Bomb (gib collision)?

Postby Gary on Fri Jun 22, 2012 5:07 pm

Pretty sure gibs/debris do not collide with the player. I'm also pretty sure that is defined in code.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users