• AddGameFlag
    2 replies, posted
[code] function SWEP:LaunchBarrel( ) if (!SERVER) then return end local ply = self.Owner local stuff = ents.Create("prop_physics") stuff:SetModel("models/props_c17/oildrum001_explosive.mdl") stuff:SetPos(ply:GetShootPos() + self:GetForward() * 70) stuff:SetAngles( ply:GetAngles() ) stuff:Spawn() local Phys = stuff:GetPhysicsObject() local Force = ply:GetAimVector() * 100000 if Phys:IsValid() then Phys:ApplyForceCenter(Force) Phys:AddGameFlag(FVPHYSICS_WAS_THROWN) end self.Weapon:SetNextSecondaryFire(CurTime() + self.Secondary.Delay) end [/code] I couldn't get Phys:AddGameFlag(FVPHYSICS_WAS_THROWN) working. What am i doing wrong?
What do you mean by you can't get it working, Are there any errors, or does the oil drum not explode on impact?
[QUOTE=NullPoint;20021413]What do you mean by you can't get it working, Are there any errors, or does the oil drum not explode on impact?[/QUOTE] Not exploding on impact. No errors. [url]http://wiki.garrysmod.com/?title=PhysObj.AddGameFlag[/url]
Sorry, you need to Log In to post a reply to this thread.