• Freeze prop on spawn?
    2 replies, posted
Hey, I've tried using this code to spawn basic chairs around the map however I can't disable to movement of the object. here's the main part of the code: [code] local mapchairslol = ents.Create("prop_vehicle_prisoner_pod"); mapchairslol:SetPos(v[1]); mapchairslol:SetAngles(v[2]); mapchairslol:SetModel("models/nova/airboat_seat.mdl") mapchairslol:SetRenderMode(RENDERMODE_TRANSCOLOR) mapchairslol:SetColor( Color( 0, 0, 0, 0 ) ) mapchairslol:GetPhysicsObject():EnableMotion(false) mapchairslol:SetKeyValue("vehiclescript", "scripts/vehicles/prisoner_pod.txt") mapchairslol:Spawn(); [/code] And yeah, EnableMotion(false) didn't seem to work. :/ Thanks
[QUOTE=kpjVideo;46185502]Hey, I've tried using this code to spawn basic chairs around the map however I can't disable to movement of the object. here's the main part of the code: [code] local mapchairslol = ents.Create("prop_vehicle_prisoner_pod"); mapchairslol:SetPos(v[1]); mapchairslol:SetAngles(v[2]); mapchairslol:SetModel("models/nova/airboat_seat.mdl") mapchairslol:SetRenderMode(RENDERMODE_TRANSCOLOR) mapchairslol:SetColor( Color( 0, 0, 0, 0 ) ) mapchairslol:GetPhysicsObject():EnableMotion(false) mapchairslol:SetKeyValue("vehiclescript", "scripts/vehicles/prisoner_pod.txt") mapchairslol:Spawn(); [/code] And yeah, EnableMotion(false) didn't seem to work. :/ Thanks[/QUOTE] The entity isn't created until after Spawn(). So put your EnableMotion after it.
[QUOTE=mcd1992;46185514]The entity isn't created until after Spawn(). So put your EnableMotion after it.[/QUOTE] Thanks! I'm dumb haha Closed.
Sorry, you need to Log In to post a reply to this thread.