ID:156241
 
Okay so I'm still learning but unless I missed this in a guide somewhere in which Zalil's Guide shows that this should work, it's not exactly working correctly so I know for sure something was left out.

mob
Login()
icon = 'Person.dmi'
icon_state = "gender"
..()

This is the way Zalil's Guide 1 has it along with the pink,blue, and black gendered players to choose from but its obvious that the game doesn't recognize which to let you choose from or even which to start with.
Thats because the game does not just magically let you "choose" you need to code it silly!.

mob/icon = 'person.dmi'

mob/Login()
..()
//im to tired to remember if your allowed to do this here
mob/Login()
..()
//im to tired to remember if your allowed to do this here
switch(input("Select your Icon/Gender","Gender Benda") as null|anything in list("Male","Female","Gaga"))
if("Male")
src.icon_state = "male"
if("Female")
src.icon_state = "female"
if("Gaga")
src.icon_state = "neuter"

In response to Midgetbuster
Midgetbuster wrote:
Thats because the game does not just magically let you "choose" you need to code it silly!.

> mob/icon = 'person.dmi'
>
> mob/Login()
> ..()
> //im to tired to remember if your allowed to do this here
> mob/Login()
> ..()
> //im to tired to remember if your allowed to do this here
> switch(input("Select your Icon/Gender","Gender Benda") as null|anything in list("Male","Female","Gaga"))
> if("Male")
> src.icon_state = "male"
> if("Female")
> src.icon_state = "female"
> if("Gaga")
> src.icon_state = "neuter"
>


the var "gender" is automatically male, female, neuter plural. So it depends on the key. But yeah people often use that system you showed.
In response to Enic
Ah ok. Now it's making more sense and now it worked. Thanks guys!
In response to Enic
Yea i know, but i felt like showing something a tad bit more fun then just a simple one line code.
In response to Enic
Enic wrote:
the var "gender" is automatically male, female, neuter plural. So it depends on the key. But yeah people often use that system you showed.

This is true, except in the sense that in some games, people want to be a different gender than what they really are. For example, a weird guy might want to play as a really hot chick. :P
In response to CauTi0N
CauTi0N wrote:
Enic wrote:
the var "gender" is automatically male, female, neuter plural. So it depends on the key. But yeah people often use that system you showed.

This is true, except in the sense that in some games, people want to be a different gender than what they really are. For example, a weird guy might want to play as a really hot chick. :P

I know. I were just explaining to him how the gender var works.
you can do src.icon_state = "[src.gender]"
In response to Yash 69
Yash 69 wrote:
you can do src.icon_state = "[src.gender]"

Just want to point out that src is not necessary in this case... icon_state="[gender]" works the same way, you're just typing it to change the icon state of the state it's already supposed to change.
But well, some people think it's easier to read codes with src.
In response to Enic
Enic wrote:
But well, some people think it's easier to read codes with src.

Primarily why it is a good practice to include it. :P