• can you spawn entities in a lua file?
    4 replies, posted
can you?, i mean like putting the cordinates in it and the view angle. //Thanks, i know my english is bad :(
[b][url=http://wiki.garrysmod.com/?title=Ents.Create]Ents.Create [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] [b][url=http://wiki.garrysmod.com/?title=Entity]Entity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
thanks, but i cant find the cordinates thing :( [editline]11:40AM[/editline] entity:SetPos( Vector(11.1, 1.1, 1.1) entity:SetAngles(Angle(90, 0, 0)) i found this
This is how you would spawn a simple prop at the world spawn: [lua]local ent = ents.Create( "prop_physics" ) ent:SetPos( Vector( 0, 0, 0 ) ) ent:SetAngles( Angle( 0, 0, 0 ) ) ent:Spawn() ent:Activate()[/lua]
[QUOTE=Overv;24058928]This is how you would spawn a simple prop at the world spawn: [lua]local ent = ents.Create( "prop_physics" ) ent:SetPos( Vector( 0, 0, 0 ) ) ent:SetAngles( Angle( 0, 0, 0 ) ) ent:Spawn() ent:Activate()[/lua][/QUOTE] im going to try that. [editline]12:59PM[/editline] i got it to work now!, thanks guys.
Sorry, you need to Log In to post a reply to this thread.