making objs and adding them to a list so you can do it agai in Developer Help
|
|
I can't figure this out:
mob var/builtstuff=list("") PC density = 1 verb check() var/k = input("What You Want to Build?") in usr.builtstuff if(k) new type(k) K.loc = locate(usr.x,usr.y,usr.z) else usr<<"You Have To Create Something First"
verb create(arg as icon) var/obj/J = new(locate(usr.x,usr.y-1,usr.z)) J.icon = arg var/states=list("") for(var/L in icon_states(J.icon)) states+=list("[L]") J.icon_state = input("What Icon State?") in states J.name = input("Whats It's Name?") as text J.density = input("Whats It's Density?") as num if(J.density > 1) J.density = 1 J.opacity = input("Whats It's Opacity?") as num if(J.opacity > 1) J.opacity = 1 J.layer = input("Whats It's Layer?") as num if(J.layer > 7) J.layer = 7 if(J.layer < 0) J.layer = 0 var/cont = input("Would You Like To Set More Advanced Options?","Y or N","No") if(cont == "N") usr.builtstuff+=J return if(cont == "Y") var/genders=list("male","female","neuter") J.gender = input("Whats It's Gender?") in genders var/directions=list("NORTH","EAST","SOUTH","WEST") var/dit = input("Direction?") in directions if(dit == "NORTH") J.dir = NORTH if(dit == "EAST") J.dir = EAST if(dit == "SOUTH") J.dir = SOUTH if(dit == "WEST") J.dir = WEST usr.builtstuff+=J else usr.builtstuff+=J return
|
It's suppossed to let them create an obj and then save it to a list so they can make it again, but I can't get it to remake it... The Create Works Fine.
All the check verb does is move the one I made manually, instead of makinga new one =(
All Help Is Highly Appreitaited and very welcome =D
|
I changed new type(k) to new k.type(). Also, you are mixing cases. You have var/k as the variable, but use K (uppercase) when setting the loc. Variables are case sensitive.