• util.BlastDamage dealing 0 damage
    6 replies, posted
[CODE]function ENT:Explode() if self.Exploding then return end self.Exploding = true local cpos = self:GetPos() local effectdata = EffectData() effectdata:SetStart(cpos) effectdata:SetOrigin(cpos) effectdata:SetScale(1) util.Effect("Explosion", effectdata) util.BlastDamage(self, self, self:GetPos(), 3000, 80) end [/CODE] Alright now that I got that other issue out of the way a new problem has arisen. The BlastDamage doesn't 'work'. And what I mean by that is it doesn't calculate any damage whatsoever. Every single time my object explodes even when I am standing on top of it, it does ZERO damage. I want to know what I am doing wrong. BlastDamage has been enough of a headache so far and it seems to not quit.
[url]https://developer.valvesoftware.com/wiki/Env_explosion[/url] You have to set the keyvalue "iMagnitude" to the amount of damage you want [lua] self:SetKeyValue( "iMagnitude", "250" ) [/lua]
[QUOTE=Pandaman09;43215598][url]https://developer.valvesoftware.com/wiki/Env_explosion[/url] You have to set the keyvalue "iMagnitude" to the amount of damage you want [lua] self:SetKeyValue( "iMagnitude", "250" ) [/lua][/QUOTE] Either I am using it wrong or it isn't working. I have no need for it.
[QUOTE=Pandaman09;43215598][url]https://developer.valvesoftware.com/wiki/Env_explosion[/url] You have to set the keyvalue "iMagnitude" to the amount of damage you want [lua] self:SetKeyValue( "iMagnitude", "250" ) [/lua][/QUOTE] env_explosion is shit though util.BlastDamage is a better solution
[QUOTE=BFG9000;43216405]env_explosion is shit though util.BlastDamage is a better solution[/QUOTE] You know what would be cool, if I COULD GET IT TO WORK *Rips hair*
Are you, at any point, setting yourself to the owner of the entity? I may be wrong, but the last time I tried it, util.BlastDamage doesn't deal damage to the entity who owns it.
[QUOTE=Kogitsune;43217980]Are you, at any point, setting yourself to the owner of the entity? I may be wrong, but the last time I tried it, util.BlastDamage doesn't deal damage to the entity who owns it.[/QUOTE] Really? so this whole time I didn't have to use findinsphere and tables to do that explosive fists SWEP? argh
Sorry, you need to Log In to post a reply to this thread.