Model that replaces city scanner is facing wrong way
1 replies, posted
I'm trying to replace the model of the city scanner, but when I replace the model, it flies sideways towards me. I tried using SetAngles, but that doesn't work either. I've even recompiled the model, and this still hasn't worked. Can anyone help? Here's the addon:[url]https://www.dropbox.com/sh/mmnyz9lfmok0t4z/AABN2ecXP7O0X6xU_fNJVc-ra?dl=0[/url]
And here's the relevant code
[code] function ENT:Initialize()
self.sentinel = ents.Create( "npc_cscanner" )
self:SetModel( "models/shells/shell_12gauge.mdl" )
self.sentinel:SetPos( self:GetPos() )
self.sentinel:SetAngles(Angle(0, 90, 100))
self.sentinel:Spawn()
self.sentinel:Activate()
if IsValid( self.sentinel ) then
self.sentinel:SetHealth(200)
self.sentinel:SetMaxHealth(200)
self.sentinel:SetModel("models/sentinel/sentinel.mdl")
self.sentinel:SetAngles(Angle(90, 90, 90))
self.sentinel:Fire("SetFlightSpeed", "2000")
end
end
[/code]
edit: Nevermind, I recompiled the model and it worked
The model itself must have correct animations and alignment. You MAY be able to override the render angles with a special function, but it would be far from perfect.
Sorry, you need to Log In to post a reply to this thread.