Hi!
Excuse me for any grammatical errors.
I'm trying to create a simple entity (an iron counter with a "prisoner pod" above)
I did it and this is my result:
https://files.facepunch.com/forum/upload/293577/ed0041f6-d3e3-4089-b1f0-267fe681e28e/result.png
This is just what I wanted but there is a problem..
https://files.facepunch.com/forum/upload/293577/0ad97627-c881-408b-8d76-9d6d2186307c/result2.png
when I use the pod, the animation is the same as when I sit on a chair..
Any help?
Thank you!
This is the code (init.lua):
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/props_wasteland/kitchen_counter001c.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local pod = ents.Create( "prop_vehicle_prisoner_pod" )
pod:SetModel( "models/props_combine/eli_pod_inner.mdl" )
pod:SetKeyValue( "vehiclescript", "scripts/vehicles/prisoner_pod.txt" )
pod:SetAngles( self:GetAngles() + Angle( -90, 180, 180 ) )
pod:SetPos( self:GetPos() + Vector( 0,0,30 ))
pod:SetParent( self )
pod:Spawn()
pod:Activate()
local obj = self:GetPhysicsObject()
if obj:IsValid() then
obj:Wake()
end
end
I see that you've fixed this already but I've yet to create an entity - does it weld them together when you call it as a parent?
Yes it does
Sorry, you need to Log In to post a reply to this thread.