//This is a test world created by Nathaneil on 4/21.
mob
icon = 'person.dmi' //make it so all mobs will be created with the person icon
bug //new prototype
icon = 'bug.dmi' //override the parent's icon, which was 'person.dmi'
var
HP = 30 //define a new variable called HP, with a value of 30
proc
DeathCheck() //check for death with a proc
if (HP <= 0) //if HP of defender is 0 or lower...
world << "[src] dies!" //do the death message
Login()
icon_state = gender //when a player logs in, make their icon's state
..() //the gender of their key. Then call the parent!
verb
attack(mob/M as mob in oview(1)) //attack a mob within 1 tile of you
usr << "You attack [M]!" //send this message to the usr
oview() << "[usr] attacks [M]!" //send this message to everybody else
var/damage = rand(1,10) //assign a random # to a new variable between 1-10
world << "[damage] damage!" //tell the damage to the world
M.HP -= damage //take away the damage from M
say(msg as text) //what the usr says is passed into "msg" as text
world << "[usr]: [msg]" //the world sees chatroom-like output
emote(msg as text)
world << "*[usr] [msg]*"
turf
grass //defines a "grass" prototype, which is a kind of turf...
icon = 'grass.dmi' //and has an icon named 'grass.dmi'. In single quotes!
world //we set one of our world's characteristics:
turf = /turf/grass //its default turf is the grass turf.
Problem description:
Thats my whole code, but the problem is that when I run it, it shows a stick figure, like its supposed to, and then the turf is all black... please help (additional info needed? just ask for more... lol)
Btw... this isnt a real game, its just for me to learn coding, im using a guide, but I guess they didnt encounter this problem
Also make sure that grass.dmi exists and try a clean compile (Build > Clean Compile)