Owner
verb
New_Create_Verb()
set category = "Owner"
switch(alert("What Do You Want To Do Create?","","Object","Turf"))
if("Object")
var/T = input("Type In The Objects ID") as text|null
if(!T)
return
else
for(var/obj/O as null|anything in typesof(/obj))
if(O.ID == "[T]")
var/obj/OB = new O(usr.loc)
view()<< "<font color=green>[usr]:Creates A [OB.ID]"
return
if("Turf")
return
hi, its been awhile since being on here and im trying to get to know coding again, I am trying to make my Create verb more better by giving lets say objects and ID, then using the create verb to type the object ID to create it. I get an error when I use the verb and does not create anything, anyone have any ideas where im going wrong in the code. thanks:
There's a trick in DM using initial() that lets you do this without creating a new object first though.
Keep in mind, this trick can't be used on const-type vars.