ID:177326
 
Hey! Could someone give me a Build verb and a destroy verb (Only works on stuff you build)?
Sure can.

mob/verb/Build()

mob/verb/Destroy()
-------------------
You never told us what you wanted them to do.
In response to Mertek
Build as in create a new object with certain attributes like density and stuff. And destroy everything you have built. Thank YE!
In response to Tiko587
mob
verb
Build(/obj/O in world)
new O(usr.loc)
O.owner = usr.key
Destroy()
for(var/obj/O in world)
if(O.owner == usr.key)
del(O)
In response to Tiko587
Tiko587 wrote:
Build as in create a new object with certain attributes like density and stuff. And destroy everything you have built. Thank YE!

I'm not sure how it's done in most BYOND 'building' games, but here's how I'd go about doing it:

obj/var/mob/owner // The maker of the object

mob/verb/Build(choice in list("Block1","Block2"))
var/obj/O = new
O.icon_state = choice // This assumes that the icon states of these blocks are infact "Block1" and "Block2"
if(alert("Will the object be dense?","Set Density","Yes,"No")) == "Yes")
O.density = 1
O.loc = src.loc
O.owner = src
src << "Object built."
return

mob/verb/Destroy()
for(var/obj/O in world)
if(O.owner == src)
del(O)
src << "All built objects destroyed."

Hope that helps you out.
I'm just going to assume that was a horrible joke.