• How can I set up my gamemode to place specific entities on the map?
    3 replies, posted
To clarify, I need something similar to what Bad King Urgrain did with TTT: A STOOL or some other method of placing entities on a map, in sandbox, then loading up those placements after loading up the map in the gamemode. Is there an easy way to do this? EDIT: Oh, geez, I just saw that thread way down near the bottom that asked nearly the same thing. Gah! Am going to check it out now. I scanned the front page and still did not see that until after I posted. EDIT2: PermaProps can't save complex entities... So I still need a solution to this!
[lua] hook.Add("InitPostEntity","Postanent",function() local e = ents.Create("npc_zombie") e:SetPos(Vector(0,0,0)) e:Spawn() end) [/lua] Serverside..
Hm... Well, being quite new to Lua, I'm not entirely sure how to even use that. And how well will it work for populating entire maps with a lot of different items spawning all over the place?
The code I posted will spawn a zombie at the position specified in the SetPos method. You need to create a table full of positions then loop through that and spawn the entity at every position found. I would suggest posting in the request section if you do not know lua, you will probably get more support there.
Sorry, you need to Log In to post a reply to this thread.