• Sawblade Pistol physics problems
    1 replies, posted
Yeah, like title says, i'd like to make a pistol that shoot saw blades. i originally thought i'd do a prop gun, but the resulting 'bullet' just is more of a blunt force object, not like when you throw one with the gravity gun, which is what i'm looking for. i found code in an earlier post on that you have to make it an entity (in particular, [thread=811522] this one[/thread]), but my current setup just causes the saw blade to bounce off of stuff and not actually slice n' dice. I've also searched garrysmod for a similar weapon, and the closest i've gotten was a rocket propelled chainsaw. it can get stuck in a wall, but it just strikes npcs dead. help seriously appreciated.
Try this: [lua] local phys = ent:GetPhysObject() // ent will be your sawblade if phys:IsValid() then phys:AddGameFlag( FVPHYSICS_WAS_THROWN ) end [/lua] That should make it stick into walls and slice NPCs, since FVPHYSICS_WAS_THROWN simulates being thrown from the gravity gun.
Sorry, you need to Log In to post a reply to this thread.