ID:167421
 
i need a building code
chould anyone help?
I won't give code, but I can tell you how to do it yourself.

Option 1: Create a list of all the buildable objects' type paths, then create a verb that allows the player to choose something to create from that list (stored in a var/obj). When a type path is chosen, use A = new(usr.loc) to put it on the map. you could use x and y displacement to put it anywhere with respect to the player. Efficient, but harder than option 2.

Option 2: Create a seperate verb for every buildabe object. Slightly easier to create, but unwieldly and annoying unless you memorize the locations of all the objects in the verb list.

I suggest #1 - I use it for the admin "create" option in my game.


--Vito
In response to Vito Stolidus
Thank you