• Creating Static Props ( prop_physics vs prop_static )
    6 replies, posted
I'm using a for Loop to create a set of props [CODE] for i = 1, #prop6 do local prop_6 = ents.Create("prop_static") prop_6:SetModel(prop6[i].prop) prop_6:SetName("TankProps1") prop_6:SetPos(prop6[i].position) prop_6:SetAngles(prop6[i].angles) prop_6:Spawn() end[/CODE] The problem is, when i use prop_static, the props don't appear, if i use prop_physics they fall over and i have tried using SetMoveType and EnableMotion( false ) and it doesn't work. the idea is to create frozen props on the map that cannot be moved and will stay frozen in place. can anyone help. thanks in advanced
prop_static is only for use with hammer use prop_dynamic_override
[QUOTE]woops i set it to props_dynamic. adding dynamic now. ah thanks, what would i use to make them collide with players and other entities?[/QUOTE] I want the props to be physical but not move.
they should be colliding by default but using enablemotion should work on physics props anyway, as long as you do it on the physics object
[QUOTE=Giraffen93;49285587]they should be colliding by default but using enablemotion should work on physics props anyway, as long as you do it on the physics object[/QUOTE] Ok i got it working with prop_6:GetPhysicsObject():EnableMotion(false) is there a way to disable physgun on the prop?
Create a prop physics Do either [code]local phys = prop_6:GetPhysicsObject() if IsValid(phys) then phys:EnableMotion(false) end[/code] or[code]prop_6:SetMoveType(MOVETYPE_NONE)[/code] after :Spawn() [editline]10th December 2015[/editline] [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/PhysgunPickup]GM/PhysgunPickup[/url]
thanks man i actually just tried that before i saw your reply and it works, thanks for the help.
Sorry, you need to Log In to post a reply to this thread.