Hello,
I made an mdl-Object and I wrote in the qc-file: $surfaceprop "flesh"
It works fine if I throw it with the physicgun.
But if I make an Entity (lua script with the mdl-objetc) it have no "flesh-sound".
How can I fix that?
(sorry for my english)
what entity class you create in lua? prop_physics? prop_ragdoll? sent_xxxxx?
Did you tried to set the surface propertie after you created the entity?
[url]http://wiki.garrysmod.com/page/construct/SetPhysProp[/url]
Thank you for your respond. You mean ENT.Type = "anim" ?
I tried [B]construct.SetPhysProp( ply, self, 0, nil, { GravityToggle = true, Material = "flesh" } )[/B]
but nothing happend.. maybe "Material" is wrong?
try physobj.SetMaterial
Thank you for your answer.
I tried [B]physobj.SetMaterial[/B], I can change the material this that, but I hear no sound (if I throw it with the physicgun)
This must be a bug in gmod itself.
Scripted entities does not have the impact sound.
I tried it like this:
Spawned a prop, applied zombieflesh using phys prop tool with "flesh" not "zombieflesh"
Spawned a prop, applied zombieflesh using lua:
[CODE]lua_run local ent = Entity(112) construct.SetPhysProp( _, ent, 0, ent:GetPhysicsObject(), { GravityToggle = true, Material = "flesh" } )[/CODE]
Physic sounds worked.
Spawned different Scripted entities from different mods, applied it the same way, using tool and lua.
Physics sound didnt worked, except one:
Only "scrapesmooth" seems to be used.
This is the surfaceprop define in surfaceproperties.txt:
[CODE]
"flesh"
{
"density" "900"
"stepleft" "Flesh.StepLeft"
"stepright" "Flesh.StepRight"
"bulletimpact" "Flesh.BulletImpact"
"impacthard" "Flesh.ImpactHard"
"impactsoft" "Flesh.ImpactSoft"
"scraperough" "Flesh.ScrapeRough"
"scrapesmooth" "Flesh.ScrapeSmooth"
// "strain" "Flesh.Strain"
"break" "Flesh.Break"
"audiohardnessfactor" "0.25"
"audioHardMinVelocity" "500"
"audioroughnessfactor" "0.1"
"gamematerial" "F"
}
[/CODE]
Sorry, you need to Log In to post a reply to this thread.