if heli_npc:IsValid() then
local rocketpos = heli_npc:GetPos()
local x = rocketpos.x;
local y = rocketpos.y;
local z = rocketpos.z;
local rocketpos = ents.Create("rpg_missile")
rocketpos:SetPos(Vector(x, y + 40, z - 50) + heli_npc:GetForward() * 300)
//rocketpos:SetAngles(Angle(xang, yang, zang))
rocketpos:SetOwner(heli_npc)
rocketpos:PointAtEntity(attc)
rocketpos:Spawn()
end
I wonder why the missiles don't do any damage. They work just fine, like explode on impact etc but no damage to anything.
You need to set it's damage using this (worked for me when I needed it), something like
rocketpos:SetSaveValue("m_flDamage", 200)
Works like a charm! Thank you <3
You would use Entity/GetSaveTable for that
Sorry, you need to Log In to post a reply to this thread.