• Really bad problem
    8 replies, posted
Sorry for this post, but when entities (playermodel models) are spawned by the InitPostEntity hook. Their models are mesed up like this: [img]http://puu.sh/2lo6N[/img] [img]http://puu.sh/2logD[/img] If you can't see what's happening, the entities feet are moving in and out. [highlight](User was banned for this post ("Undescriptive thread title. Start putting effort into your threads already." - postal))[/highlight]
You try to spawn a model to low and it bug and physics of the game trying to solve its. Sorry for my bad english
yeah obviously, but how do I get it to go higher? I tried it but it still happens [editline]21st March 2013[/editline] Bump.
Edit where they Spawn... SetPos?
[QUOTE=WinterPhoenix;39991189]Edit where they Spawn... SetPos?[/QUOTE] I tried that, I even added a Vector (0, 0, 40) to make it go up more. No luck. [editline]21st March 2013[/editline] [lua] function ENT:Initialize() self:SetModel( "models/breen.mdl" ) self:PhysicsInit( SOLID_BBOX ) self:SetMoveType(MOVETYPE_STEP) self:SetUseType(SIMPLE_USE) self:SetSolid( SOLID_BBOX ) local seq = self:LookupSequence("idle03") self:SetSequence(seq) local phys = self:GetPhysicsObject() if (phys:IsValid()) then phys:Wake() end end [/lua] this is my code for the NPCs
[QUOTE=tyguy;39991197]I tried that, I even added a Vector (0, 0, 40) to make it go up more. No luck. [editline]21st March 2013[/editline] [lua] function ENT:Initialize() self:SetModel( "models/breen.mdl" ) self:PhysicsInit( SOLID_BBOX ) self:SetMoveType(MOVETYPE_STEP) self:SetUseType(SIMPLE_USE) self:SetSolid( SOLID_BBOX ) local seq = self:LookupSequence("idle03") self:SetSequence(seq) local phys = self:GetPhysicsObject() if (phys:IsValid()) then phys:Wake() end end [/lua] this is my code for the NPCs[/QUOTE] Okay. Do you have a Serverside Lua File that spawns the NPC for you, or are you doing it inside of the Entity? A working Example of a Serverside Lua File: [CODE] local Piano = ents.Create("gmt_instrument_piano") Piano:SetPos(Vector(250, 100, 10)) Piano:SetAngles(Angle(0, 0, 0)) Piano:Spawn() Piano:Activate() end hook.Add("InitPostEntity", "SpawnPiano", SpawnPiano) [/CODE]
[QUOTE=WinterPhoenix;39991245]Okay. Do you have a Serverside Lua File that spawns the NPC for you, or are you doing it inside of the Entity? A working Example: local Piano = ents.Create("gmt_instrument_piano") Piano:SetPos(Vector(250, 100, 10)) Piano:SetAngles(Angle(0, 0, 0)) Piano:Spawn() Piano:Activate() end hook.Add("InitPostEntity", "SpawnPiano", SpawnPiano)[/QUOTE] Inside of the entity I think (lua/entities/npc_names), in ENT:Initialize
[QUOTE=tyguy;39991249]Inside of the entity I think (lua/entities/npc_names), in ENT:Initialize[/QUOTE] That could cause problems. Just do it in another serverside lua or add the spawning code to your sv_init.lua file.
[QUOTE=WinterPhoenix;39991263]That could cause problems. Just do it in another serverside lua or add the spawning code to your sv_init.lua file.[/QUOTE] Why would it cause problems?
Sorry, you need to Log In to post a reply to this thread.