• Spawn a Model/Ent, then freeze it
    7 replies, posted
I can't figure this out. I don't know why, but I can't. I set the MovementType to MOVEMENT_NONE, and it still drops to the floor on spawn. Does not have DropToFloor() on. Thanks.
I don't know if you were just paraphrasing, but the correct syntax for SetMoveType is [lua]ent:SetMoveType(MOVETYPE_NONE)[/lua] [b][url=http://wiki.garrysmod.com/?title=Entity.SetMoveType]Entity.SetMoveType [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
-snip- Double post.
Fuck im as dumb as a brick. This was snipped.
Ok, new issue, why do these fall to the ground? [lua]function SpawnBubbles() local pos = { Vector(1034, -1517, -100), Vector(1086, -1517, -100) } for k,v in pairs(pos) do local bubble = ents.Create("prop_physics") bubble:SetPos(v) bubble:SetAngles(Angle(0,-45,0)) bubble:SetModel("models/extras/info_speech.mdl") bubble:AddEffects( EF_ITEM_BLINK ) bubble:AddEffects( EF_NOSHADOW ) bubble:SetSolid(SOLID_NONE) bubble:SetMoveType(MOVETYPE_NONE) bubble:Spawn() print("NPC Bubble -> spawned") end end hook.Add("InitPostEntity", "SpawnBubbles", SpawnBubbles)[/lua]
Tried setting move type after spawning?
[code] function SpawnBubbles() local pos = { Vector(1034, -1517, -100), Vector(1086, -1517, -100) } for k,v in pairs(pos) do local bubble = ents.Create("prop_physics") bubble:SetPos(v) bubble:SetAngles(Angle(0,-45,0)) bubble:SetModel("models/extras/info_speech.mdl") bubble:AddEffects( EF_ITEM_BLINK ) bubble:AddEffects( EF_NOSHADOW ) bubble:SetSolid(SOLID_NONE) bubble:Spawn() bubble:GetPhysicsObject():EnableMotion(false) print("NPC Bubble -> spawned") end end hook.Add("InitPostEntity", "SpawnBubbles", SpawnBubbles) [/code]
foxxeh, <3 Thanks guys :)
Sorry, you need to Log In to post a reply to this thread.