ID:261446
 
I am still trying to learn DM and I cant figure out how to get the Create code for all players to use like on DWO Chat. If anyone can help me get at least the Create code for me so it pops up in a window with the types of icons you can use (png, bmp, dmi), i'd be thankful. heres what I got:

verb/create()
set desc = "(gz) create a turf"
set category = "functions"

Also I want ot know how I would go about making a time code that goes from 12:00 noon - 12 midnight, thanks.





-much love
Branl Starwind wrote:
I am still trying to learn DM and I cant figure out how to get the Create code for all players to use like on DWO Chat. If anyone can help me get at least the Create code for me so it pops up in a window with the types of icons you can use (png, bmp, dmi), i'd be thankful. heres what I got:

verb/create()
set desc = "(gz) create a turf"
set category = "functions"

I'm not sure about the time code, since you weren't completely specific -- do you want real-world time to be represented in the game, or do you want the game to run through from 12:00 noon through 12:00 midnight and then suddenly jump to 12:00 noon again, etc.

However, the create I can help you with.

What you want to use is the new type(loc) proc. That is:

mob/verb/create_object()
new /obj/object(src.loc)
usr << "Boom! You created a new object!"

You can also apply variations on this in any way desired -- for example:

mob/verb/create_grass()
new /turf/grass(src.loc)
usr << "You plant a bunch of grass seeds."

I wouldn't recommend getting much fancier than that until you're familiar with new() and how it works.


If you want to edit your object afterwards, you have to stick it into a special variable. For example:

mob/verb/create_object()
var/obj/object/O
O = new /obj/object(src.loc)
O.name = "I'm a new object!"
usr << "Boom! You created a new object!"
For the create approach you could put,

mob/verb/Create(var/O as null|anything in typesof(/atom))
new O(src.loc)
In response to Spuzzum
thanks for the wonderful help Spuzzum, about the time, i was thinking about having 12:00 - 12:00 non real time. like having it run an hour every 10min. or so. it might be really hard, but I know any of the code guru's can do it.