ID:141675
 
This is my code.

mob
icon = 'Person.dmi' //make it so all mobs will be created with the person icon
var
HP = 30 //define a new variable called HP, with a value of 30
wealth = 0 //define a new variable called Wealth, with a value of 0
bug //new prototype
icon = 'bug.dmi' //override the parent's icon, which was 'person.dmi'
Del()
var/obj/gold/G = new(loc) //create a new obj from the gold blueprint
G.amount = rand(1,100) //set its amount variable randomly
..() //call the parent
Login()
icon_state = gender //when a player logs in, get them the right icon state for
..() //the gender of their key. Then call the parent!
proc
DeathCheck() //check to see if an attack is deadly
if (HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //give the death messaging
verb
attack(mob/M as mob in oview(1))
if (M.HP <= 0) //if M's HP are at or below 0...
usr << "[M] is already dead!"
else //otherwise...
usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
var/damage = rand(1,10)
world << "[damage] damage!"
M.HP -= damage
M.DeathCheck()
say(msg as text) //what the usr says is passed into "msg" as text
world << "[usr]: [msg]" //the world sees chatroom-like output
obj
gold
icon = 'gold.dmi'
var
amount
verb
get() //obj/gold/verb/get()
set src in view(1) //src must be close
usr << "You pick up [amount] gold."
usr.wealth += amount //add to usr.wealth
del(src) //delete the gold
turf
grass //define a "grass" prototype, which is a kind of turf...
icon = 'grass.dmi' //that has an icon named 'grass.dmi'. In single quotes!
world //set one of our world's characteristics:
turf = /turf/grass //its default turf is the grass turf.

I did everything that a tutorial told me, but my character is invisible. The system shows that I have zero errors or warnings, but i can't play a game without player icons. Please help me, I'm very new at this.
1: switch to text mode to see if your mob is loaded onto the map.
2: make sure you have icon states needed inside of the icon
In response to Madpeter
I swiched to text and my character is there, and I have three characters in my Icon. If you would like to check the tutorial to see what I messed up, it is at

http://www.byond.com/members/ DreamMakers?command=view_post&post=36143
This is my code.

mob
icon = 'Person.dmi' //make it so all mobs will be created with the person icon
var
HP = 30 //define a new variable called HP, with a value of 30
wealth = 0 //define a new variable called Wealth, with a value of 0
bug //new prototype
icon = 'bug.dmi' //override the parent's icon, which was 'person.dmi'

Del()
var/obj/gold/G = new(loc) //create a new obj from the gold blueprint
G.amount = rand(1,100) //set its amount variable randomly
..() //call the parent
Login()
icon_state = gender //when a player logs in, get them the right icon state for
..() //the gender of their key. Then call the parent!


------------------------------------------------------------



Try moving the "bug" mob to the end... the order in the way you typed it must be messing with your code..


------------------------------------------------------------



mob
icon = 'Person.dmi' //make it so all mobs will be created with the person icon
var
HP = 30 //define a new variable called HP, with a value of 30
wealth = 0 //define a new variable called Wealth, with a value of 0
Login()
icon_state = gender //when a player logs in, get them the right icon state for
..() //the gender of their key. Then call the parent!
Del()
var/obj/gold/G = new(loc) //create a new obj from the gold blueprint
G.amount = rand(1,100) //set its amount variable randomly
..() //call the parent
proc
DeathCheck() //check to see if an attack is deadly
if (HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //give the death messaging
verb
attack(mob/M as mob in oview(1))
if (M.HP <= 0) //if M's HP are at or below 0...
usr << "[M] is already dead!"
else //otherwise...
usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
var/damage = rand(1,10)
world << "[damage] damage!"
M.HP -= damage
M.DeathCheck()
say(msg as text) //what the usr says is passed into "msg" as text
world << "[usr]: [msg]" //the world sees chatroom-like output
bug //new prototype
icon = 'bug.dmi' //override the parent's icon, which was 'person.dmi'



Try this:

mob
var
HP = 30
wealth = 0
bug
icon = 'bug.dmi'
Del()
var/obj/gold/G = new(loc)
G.amount = rand(1,100)
..()
Login()
icon = 'person.dmi'
icon_state = gender
..()
proc
DeathCheck()
if (HP <= 0)
world << "[src] dies!"
verb
attack(mob/M as mob in oview(1))
if (M.HP <= 0)
usr << "[M] is already dead!"
else //otherwise...
usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
var/damage = rand(1,10)
world << "[damage] damage!"
M.HP -= damage
M.DeathCheck()
say(msg as text)
world << "[usr]: [msg]"
In response to Hi1
The problem is not resolved, it changes nothing. And just to be clear, the bug is not invisible, the player character is. I really have no idea how to fix it but this did not work. Please, if somebody here knows what to do, could you tell me?
Everyone but MadPeter gave you terrible advice, don't follow them.

Are you positive you typed your icon states in case sensitive? For example, they must be "male", "female", and "neuter", without the quotations.
In response to Jeff8500
Do they have to be lowercase? I didn't know it mattered. Do I have to put in a code to call out one of the M/F/N characters, or just call the whole People Icon File?
In response to Strunk64
Strunk64 wrote:
Do they have to be lowercase? I didn't know it mattered. Do I have to put in a code to call out one of the M/F/N characters, or just call the whole People Icon File?

To clarify: Everything in DM is case-sensitive unless otherwise stated. This means that 'A' is never the same as 'a'.

gender is lowercase, if your icon_state is called 'Male' f.eks then its not going to work.
In response to Alathon
Thank you for helping, it really does work, I can see my person now, but I have another problem. This is probably simple, but how can I choose which character to show up, like male female or neuter? It currently shows up as neuter.
In response to Strunk64
It does that because your key's gender is set to neuter. You either forgot to change it or set it to neuter when you made the key.

To do what you want, use the input() procedure and get rid of the line that sets the icon_state to the gender.
In response to Andre-g1
Explain it like your talking to a noob who knows absolutely nothing about coding or fixing things.
In response to Strunk64
Okay, I still need help with other problem, but I put in a new code that fixed one problem I hadn't mentioned yet, and gave me another 4. I need to know what to put to be able to tell your gold/health/other stats once you enter the game, I need to know what to put to make monsters re spawn, I need to know how to make the back grounds transparent, because my characters are currently in white holes instead of grass, and I need to know how to save the game, or preferably, make an auto saver. I am very very bad at this, and I know I am taking up a lot of time from you, but could somebody help with some of these problems? I am posting new code below.

mob
icon = 'person.dmi' //make it so all mobs will be created with the person icon
var
HP = 30 //define a new variable called HP, with a value of 30
wealth = 0 //define a new variable called Wealth, with a value of 0
bug //new prototype
icon = 'bug.dmi' //override the parent's icon, which was 'person.dmi'
Del()
var/obj/gold/G = new(loc) //create a new obj from the gold blueprint
G.amount = rand(1,100) //set its amount variable randomly
..() //call the parent
Login()
icon_state = gender //when a player logs in, get them the right icon state for
..() //the gender of their key. Then call the parent!
proc
DeathCheck()
if (HP <= 0)
world << "[src] dies!"
del(src) //delete whatever just died
verb
attack(mob/M as mob in oview(1))
if (M.HP <= 0) //if M's HP are at or below 0...
usr << "[M] is already dead!"
else //otherwise...
usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
var/damage = rand(1,10)
world << "[damage] damage!"
M.HP -= damage
M.DeathCheck()
say(msg as text) //what the usr says is passed into "msg" as text
world << "[usr]: [msg]" //the world sees chatroom-like output
obj
gold
icon = 'gold.dmi'
var
amount
verb
get() //obj/gold/verb/get()
set src in view(1) //src must be close
usr << "You pick up [amount] gold."
usr.wealth += amount //add to usr.wealth
del(src) //delete the gold
turf
grass //define a "grass" prototype, which is a kind of turf...
icon = 'grass.dmi' //that has an icon named 'grass.dmi'. In single quotes!

world //set one of our world's characteristics:
turf = /turf/grass //its default turf is the grass turf.
In response to Strunk64
Strunk64 wrote:
I need to know what to put to be able to tell your gold/health/other stats once you enter the game, I need to know what to put to make monsters re spawn, I need to know how to make the back grounds transparent, because my characters are currently in white holes instead of grass, and I need to know how to save the game, or preferably, make an auto saver.

And the list won't ever end, since you will always want to add in another feature. Thus, basically, you have two choices.
Either you hire someone to help you with creating your game, or you take a break, sit back and read the guide.
Please note that "read" is not meant as in you would read a novel, but as in read and work with it. Write down the code, alter it, try to understand it and when you don't, reread until you do.
In response to Schnitzelnagler
Truth is, I already had these problerms before fixing my character, and I just couldn't fix them without one. These are the only problems I have, and am only making this for my family and friends. I just need to know these so that I can makre my game, and would thank you for any assistance.
In response to Strunk64
Strunk64 wrote:
These are the only problems I have, and am only making this for my family and friends. I just need to know these so that I can makre my game, and would thank you for any assistance.

All I can provide you with is the advice to look at the Libraries & Demos, together with the guide and reference.
Since you said that you wanted to create the game, it would have to be you writing (or searching) the code, though I see no harm, nor shame in hiring help.
In response to Schnitzelnagler
you just stole all of this code from zials begginer tutorial xD well my guess is that the del() for the bug is an indention error try moving all of that code (in that little tree thing) over to the right once because your saying any mob dies they drop that money
In response to Xxdragonslxx
He never said he stole it and he did mention that the snippet shown was from a tutorial. He wanted to know why the icon was not showing up, which is because the Login() was overwritten without the parent procedure ..() being called - which means that the mob did you got located to somewhere else.

There is nothing wrong with his Del() there (BTW, del != Del). The way it is position is like saying mob/Del() meaning that it works/effects for all /mob types, which means less programming to do for the same effect.
In response to GhostAnime
I have begun seeking help, anybody who wants to check out my idea can click here : http://www.byond.com/developer/forum/?id=678896&view=1. I have to be clear, I can not pay anybody, no matter how much work they do, unless the game generates the money, because I have literally zero dollars. I am just stating this so people can't say I tricked them if they get mad and quit or something. I have no plan in place to get a profit, this game is just for fun. This game will actually be for everybody, not private, but so far there is nothing made for it yet. Read inside for more info, don't pass on my offer just because it's non-profit, cheack it out, then decide. I say this because I now people who did things like that in the past. Also, please contact me at my email, only if you want to join the production team. Please don't post saying I'm ripping others off or using people, because I clearly stated in several places, that this is non-profit.