• Making explosive props
    2 replies, posted
Well I guess this would be the section to ask. How do I make my props explosive. I am making a custom bombshell model, and I need to know how I make them explode.
I hope this helps, this was taken out of a sent i made so thats why it is self.Entity:Remove() you may want to change that depending on how your spawning it. This is also runs under the function ENT:Touch. [Lua] local explosion = ents.Create( "env_explosion" ) // Creating our explosion explosion:SetKeyValue( "spawnflags", 144 ) //Setting the key values of the explosion explosion:SetKeyValue( "iMagnitude", 15 ) // Setting the damage done by the explosion explosion:SetKeyValue( "iRadiusOverride", 256 ) // Setting the radius of the explosion explosion:SetPos(self:GetPos()) // Placing the explosion where we are explosion:Spawn( ) // Spawning it explosion:Fire("explode","",0) self.Entity:Remove()[/Lua]
[QUOTE=sweeneypaul;20684616]I hope this helps, this was taken out of a sent i made so thats why it is self.Entity:Remove() you may want to change that depending on how your spawning it. This is also runs under the function ENT:Touch. [Lua] local explosion = ents.Create( "env_explosion" ) // Creating our explosion explosion:SetKeyValue( "spawnflags", 144 ) //Setting the key values of the explosion explosion:SetKeyValue( "iMagnitude", 15 ) // Setting the damage done by the explosion explosion:SetKeyValue( "iRadiusOverride", 256 ) // Setting the radius of the explosion explosion:SetPos(self:GetPos()) // Placing the explosion where we are explosion:Spawn( ) // Spawning it explosion:Fire("explode","",0) self.Entity:Remove()[/Lua][/QUOTE] He wants to know how to make a prop explosive, not how to spawn an explosion. [editline]06:33PM[/editline] Read [url=http://developer.valvesoftware.com/wiki/Prop_data]this[/url].
Sorry, you need to Log In to post a reply to this thread.