ID:159417
 
This is soppost to be where you pick / select a race just by clicking an obj or a turf on the screen.
i already made like an example but i need a little help

mob/humanicon
icon = 'human.dmi'
icon_state = "icon"
Click() // so. if you click this <- your mob becomes
// mob/humanrace with the icon and the
// var race="human"
usr.loc = locate(1,1,2)
//----
mob/humanrace
icon='human.dmi'
var
race="Human"

but im not sure how to make it click the screen then your mob becomes mob/humanrace
After they click put
Usr.race = human
Fit that into your game
See when u make something happen like them gaining something like changing
You always need to put that
Usr.(the thing) = ( what there becoming)

Hope this works for you
In response to Zforce Productions
DM is case-sensitive.

Usr != usr //Read: 'Usr' does NOT equal 'usr'


And in every other procedure, other than the Click() related procs, usr is not acceptable. You'd want src in those other procs.

And the equals operator (=) is used to assign a value to a variable, not "the thing to what they are becoming".
In response to Spunky_Girl
Spunky_Girl wrote:
And in every other procedure, other than the Click() related procs, usr is not acceptable. You'd want src in those other procs.

That's not entirely true either. In procs like Enter(), Exited(), and a few others; you'd want to use the arguments that are passed through the proc.
ie: Enter(var/atom/A) A.whatever=something
In response to Falacy
You're correct, but, that isn't entirely true either, of course, if you're going for that. :P The only correct thing to say is "use the appropriate var for the situation (which could naturally be anything)", and not usr, which is not an all-purpose var that automatically makes itself what you want, and is often unsafe.