Jump to content

Breakable props?


Wesley Tack

Recommended Posts

Hello,

Been trying to make a prop break for the past 3 hours, but it doesn't seem to work :/ (maybe it's too late and I'm too tired).

Here's what I have so far:

1 main model

4 gib models

here is my main model .qc:

$modelname props/fence_breakable.smd

$body "body" "models/props/fence_breakable.smd"

$sequence idle "models/props/fence_breakable_idle.smd" loop fps 15

$cdmaterials models/props

$surfaceprop "Wooden.Large"

$scale "1"

$keyvalues { "prop_data" { "base" "Wooden.Large" "health" "99"} }

$collisiontext

{

break

    {

        "model" "models/props/fence_breakable01.smd"

    }

break

    {

        "model" "models/props/fence_breakable02.smd"

    }

break

    {

        "model" "models/props/fence_breakable03.smd"

    }

break

    {

        "model" "models/props/fence_breakable04.smd"

    }

}

$collisionmodel "models/props/fence_breakable_phys.smd"  {

$concave

$mass 25

}
here is my big model .qc (1 out of 4, since they're all the same):
$modelname props/fence_breakable01

$cdmaterials models/props

$surfaceprop "Wooden.Large"

$autocenter

$scale "1"

$body studio "models/props/fence_breakable01.smd"

$sequence idle "models/props/fence_breakable01_idle.smd" fps 1

$collisionmodel "models/props/fence_breakable01_phys.smd"

{

$Mass 5

$concave

}

I use prop_physics and prop_physics_multiplayer (which one do I need to use?)

They both appear in game, and collisions work, I can shoot at them both for 3 or 4 shots, and at the point where they should break and the gibs should appear,

they just disappear, so the main model despawns and nothing else is being spawned (no gibs).

What am I doing wrong!? :/

Thanks in advance :x

-wez

Link to comment
Share on other sites

Hmm, look the path for the fragments, is "models/..." really needed? Seems like they don't spawn because cannot be found. Here's one of my qc's, works for sure:

$modelname peligro/plank.mdl


$cdmaterials models/elpaso


$surfaceprop "wood"

$scale "1"


$body "studio" "plank.smd"


$keyvalues

{

   "prop_data"

   {

      "base"              "Wooden.large"

	"health"	"50"

   }

}


$collisiontext { 

break { "model" "peligro/plank_frg1" "health" "1" "fadetime" "7" }

break { "model" "peligro/plank_frg2" "health" "1" "fadetime" "7" }

break { "model" "peligro/plank_frg3" "health" "1" "fadetime" "7" }

break { "model" "peligro/plank_frg4" "health" "1" "fadetime" "7" }

break { "model" "peligro/plank_frg5" "health" "1" "fadetime" "7" }

break { "model" "peligro/plank_frg6" "health" "1" "fadetime" "7" }

}


$sequence idle "plank.smd" fps 1


$collisionmodel "plank_phys.smd" {

     $Mass 20

}

Link to comment
Share on other sites

Thanks for the help guys,

R_yell: I tried your .qc, didn't work either, I'm pretty sure all my stuff is correct, it's probably like that link stated, Source not spawning my gib models...

If the engine didn't find my props it should either spawn the red ERROR model I think or at least say in the console it could find the props.

I'm just going to place the fence model I have now and hope some day they will update source and they will then suddenly work, which I think will be the case.

I don't want to waste anymore time on this not working and finish off the maps instead and release this mod lol :)

R_yell = I added you to msn, we'll talk there about your PM :)

-wez

Link to comment
Share on other sites

  • 2 months later...

$modelname "path/model.mdl"

$cdmaterials "path"

$scale 1

$body studio "model_ref.smd"

$sequence idle "model_idle.smd" fps 1

//$staticprop

$surfaceprop "plastic"

$collisionmodel "model_phy.smd"

{

$Mass 1

$concave

}

$collisiontext

{

break { "model" "path/model_gib01" "health" "0" "fadetime" "0" }

break { "model" "path/model_gib02" "health" "0" "fadetime" "0" }

}

$keyvalues

{

"prop_data"

{

"base" "plastic.Small"

"dmg.bullets" "1"

"health" "5"

}

}

$lod 15

{

replacemodel "model_ref" "model_lod1"

}

works fine in OB

Link to comment
Share on other sites

×
×
  • Create New...