Code:
mob
tan
icon = 'male.dmi'
mob
white
icon = 'male-white.dmi'
mob
dark
icon = 'male-black.dmi'
world
mob = /mob/create_character
view = 5
name = "My First Game."
turf = /turf/grass
mob/create_character
var/mob/character
Login()
var/charactername = input("What is your name?","Name",src.key)
switch(input("Skin Color") in list("Dark","White","Tan"))
if("Dark")
character = new /mob/dark
loc = (locate(45,4,11))
if("White")
character = new /mob/white
loc = (locate(45,4,11))
if("Tan")
character = new /mob/tan
loc = (locate(45,4,11))
character.name = charactername
src.client.mob = character
del(src)
mob
Login()
world << "[usr] has joined us"
mob
verb
say(msg as text)
world << "[usr] says, [msg]"
Problem description:i'm going nuts, i compile and there is no errors so i save and i run it but the map does appears what am i doing wrong??
ID:142706
![]() Mar 26 2008, 8:45 am
|
|
Where are you learning this? This is the third time I've seen this mistake made in a row. Your immediate mistake is here:
mob The default action of Login() is to place the mob on the map if it's not on the map already. However, you've overridden that, and so it no longer does that. This is a problem, as the mob you are logging into is not on the map. Therefore, black screen. You need to put the line ..() somewhere in the login to perform the default behavior. However, then you'll be asking why you aren't appearing at (45,4,11). The problem there is this: character = new /mob/tan You create a new character, change the location of src, change the new character's name, then delete src. |
Oh, and I hope you have a great time making games with Dream Maker. Goodbye :)