Hi! I am new here. I have a problem with parent to my entity. I am beginner in lua. I have created a "env_flare" entity i want to parent to my SENT.
[code]
local flare = ents.Create("env_flare")
flare:SetPos( self.Entity:GetPos() )
flare:SetParent( ent )
flare:Spawn() [/code]
ent:
[code] local ent = ents.Create("sent_JCO1S10") [/code]
this is my code for spawning flare. In code its parented but in-game its is still in one place :/
PS. Sorry my english isnt well.
Have you spawned sent_JCO1S10? Tested to see if the ent itself works?
Yep its my own entity. Maybe its other way to get my SENT id/ name ?
i think you need to give full code becuse of doing
[CODE]
local ent = ents.Create("sent_JCO1S10")
[/CODE]
shoudlent work at all because you need to spawn the entity first and stuff
EDIT: I Fixed the problem!
Thanks very much!
Sorry, you need to Log In to post a reply to this thread.