SENT gaining physical properties of model?

Hi,

I was mucking about with a very basic SENT that just spawns a wooden crate.

I noticed that the crate doesn’t have the same properties as a crate spawned from the Q menu like being smashed to bits with crowbar, making sounds when colliding with the world etc… the same applies with the explosive barrel.

Is there a way to inherit the basic properties / behavior of the model as you’d expect in a scripted SENT or does it all need to be manually coded?

By the way I downloaded a few SENTS from toybox and noticed that they suffer from the same problem.

Many thanks.

You need to code the properties of the model into the sent.

Thanks!

I think, anyway.

For a sent to act like an explosive barrel, you would need to do something like this.

On Create, set ents health to 100.
When hit, enthp=enthp-20, and then, if enthp<=20 ent.Remove(). You would also need to code the explosion, which I don’t know how.

**[Entity.GibBreakServer

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.GibBreakServer)**
**[Entity.GibBreakClient

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.GibBreakClient)**

I haven’t tested these with SENTs but I assume they work.