ID:174047
 
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
//J.text = input("What text?") as text
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
//J:overicon()
//J:dragicon()
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
DarkCampainger wrote:
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"
>

Try this
<dm>
mob
var/builtstuff=list("")
PC
density = 1
verb
check()
var/k = input("What You Want to Build?") in usr.builtstuff
if(k)
new k.type()
K.loc = locate(usr.x,usr.y,usr.z)
else
usr<<"You Have To Create Something First"


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.
In response to sapphiremagus (#1)
oops, the k's look alike to me (calls the eye doctor)

but now it just relocates the original objects that I made, I think it makes them, but doesn't locate them....

Thanks for your help =D
In response to DarkCampainger (#2)
ok, I worked on it some more, and the problem is, I think, that it doesn't know what the icon is, because it was downloaded from the usrs PC.. heres what I have now:
mob
var/builtstuff=list("")
PC
density = 1
verb
check()
var/obj/k = input("What You Want to Build?") in usr.builtstuff
if(k)
//new k.type(usr.loc)
//k.loc = locate(usr.x,usr.y,usr.z)
var/obj/J = new/obj(usr.loc)
J.icon = k.icon
J.icon_state = k.icon_state
J.name = k.name
J.density = k.density
J.opacity = k.opacity
J.layer = k.layer
J.gender = k.gender
J.dir = k.dir
else
usr<<"You Have To Create Something First"

how Do I get it to save the icon for future use?