ID:170805
 
Hello everyone. I would really like to know how to create a code that works like..

You login and choose out of two races, alien or marine. Then when you choose that race, you spawn and an avatar spawns on the screen on the lower left corner of the screen, say "1,2". If you know how, i'd appreciate it. Thanks!
Propylparaben wrote:
Hello everyone. I would really like to know how to create a code that works like..

You login and choose out of two races, alien or marine. Then when you choose that race, you spawn and an avatar spawns on the screen on the lower left corner of the screen, say "1,2". If you know how, i'd appreciate it. Thanks!

Well, first, let's set everything up:
mob
var/avatar//A reference to the avatar for future use.

Avatar
screen_loc="1,2"

Marine
icon='Marine.dmi'
Alien
icon='Alien.dmi'

proc/Create(mob/M,Race)
if(Race=="Alien")
new/Avatar/Alien()
else
new/Avatar/Marine()
M.avatar=src
M.client.screen+=src


That should get you going :)