ID:168264
 
I wanna make a verb that brings up a list of any and all objects that are in the game, and when you choose an object, it creates the object under your feet. I got the create part down, now I just need to make it so it shows the list of objects...Little help please?
create(O as null|anything in typesof(/obj,/mob,/turf)
TAB> if(O)//if O exsists
TAB> TAB> var/item = new O(usr.loc)
In response to Rky_nick
Press spacebar 3 or 4 times instead of using the tab sign. :)
In response to Elation
Had to get your attention some how, eh? Its not ugly but you don't need that var/item = new O(usr.loc) stuff. You also don't need the if(O). HELLO - o as null or anything in the type of /obj/ or /mob/ ofcourse its going to be an O.

mob
verb
CreateI(O as anything in typesof(/obj,/mob/*,/whateverelse*/))
set category="YAY"
set name="Create Items"
new O(usr.loc)
In response to XzDoG
XzDoG wrote:
You also don't need the if(O). HELLO - o as null or anything in the type of /obj/ or /mob/ ofcourse its going to be an O.

Oh it is? And what happens if the player selects null? You're going to end up with a runtime error stating that you cannot create an object of type null.
In response to Loduwijk
Forgot about the null part. >_>