ID:179849
 
Can Someone Tell me how to make it so when a person with a certain key logs in,they get a different icon from which other can't choose? and make it so they dont have to choose from the list of characters etc....
Thanks
CloneGoku wrote:
Can Someone Tell me how to make it so when a person with a certain key logs in,they get a different icon from which other can't choose? and make it so they dont have to choose from the list of characters etc....
Thanks



You would have to run a check to see if they have a certain key like so:

mob/Login()
..()
if(usr.key=="Nadrew")
src<<"Sorry Nadrew we tricked you into a DBZ game so to save you the trouble"
del(src)
else
//Put all of your other login code here and change my key and set the icon rather then deleting
CloneGoku wrote:
Can Someone Tell me how to make it so when a person with a certain key logs in,they get a different icon from which other can't choose? and make it so they dont have to choose from the list of characters etc....

I'm working on something similar right now with my own project, in choosing colors. The player's mob is transported to a special map where there are colors to choose from. The different-colored mobs will be overlaid by a white circle indicating it's their current color, or a red circle with a slash to show that that color is taken. (Some of this code isn't implemented yet, mostly because I have yet to run any kind of multiplayer test.)

If you choose this setup, what you'll want to do will be to make a map area with objs that have the various character icons. (Either that, or put them in the stat panel.) When the player clicks on these, or uses the arrow keys, or however else you want to do this, that obj's icon is transferred to the player's mob. Then, disable the obj so no other player can click it; and use some kind of indicator to show that it's taken. Just remember that once you run out of character icons, you'll need some other way of assigning them to new players, unless you want to limit the number of players in your game.

Lummox JR
In response to Nadrew
Thanks Nadrew
i need help with making a barrier spell to protect the caster
this is what i have
obj/overlays
Barrier
icon = 'Barrier.dmi'
layer = MOB_LAYER+1
mob
proc
Barrier()
usr.overlays+=/obj/overlays/Barrier
mob

In response to Nadrew
um ignore that last post for some reason it posted while i was typing sorry

Thanks Nadrew
i need help with making a barrier spell to protect the caster
this is what i have
obj/overlays
Barrier
icon = 'Barrier.dmi'
layer = MOB_LAYER+1
mob
proc
Barrier()
usr.overlays+=/obj/overlays/Barrier
ok. i have a verb but when i click it nothing happens can someone tell me why it does that and help me fix it

Thanks again
CloneGoku

In response to CloneGoku
CloneGoku wrote:
um ignore that last post for some reason it posted while i was typing sorry

Thanks Nadrew
i need help with making a barrier spell to protect the caster
this is what i have
obj/overlays
Barrier
icon = 'Barrier.dmi'
layer = MOB_LAYER+1
mob
proc
Barrier()
usr.overlays+=/obj/overlays/Barrier
ok. i have a verb but when i click it nothing happens can someone tell me why it does that and help me fix it

Thanks again
CloneGoku


Are you making the barrier proc into a verb? or do you have a different verb for it?
In response to Nadrew
i had a verb for it and when i clicked the verb nothing happened so can u put a verb in for me?
In response to CloneGoku
CloneGoku wrote:
i had a verb for it and when i clicked the verb nothing happened so can u put a verb in for me?



Well what did you do in the verb to call the Barrier proc?
In response to Nadrew
i made a NPC that teachs the spell and put
mob
WiseMan
Learn()
set src in oview(1)
switch(input("Want to learn Barrier?"."Spell")in list("Yes","No")
if("Yes")
usr.verbs+= new /mob/proc/Barrier
if("No")
usr<<"OK COME AGAIN!"
..()

In response to CloneGoku
mob
proc
Barrier()
usr.overlays+=/obj/overlays/Barrier

Almost right. You want

usr.overlays += new /obj/overlays/Barrier
In response to Spuzzum
Thanks
In response to Spuzzum
ok now i need to put it in a verb,Please help me
In response to CloneGoku
CloneGoku wrote:
ok now i need to put it in a verb,Please help me

What you were doing before (usr.verbs += /mob/proc/Barrier) worked fine, if it was properly indented.
In response to Spuzzum
ok cool thanks
In response to CloneGoku
ok. now i have a different problem, i got it working and found that when i used barrier it went on top of my person,so..i turn them into underlays but it still over layed,i think it has something to do with the layer = MOB_LAYER+1 if it is what would i change that to or if it isnt what d i do??
In response to CloneGoku
CloneGoku wrote:
ok. now i have a different problem, i got it working and found that when i used barrier it went on top of my person,so..i turn them into underlays but it still over layed,i think it has something to do with the layer = MOB_LAYER+1 if it is what would i change that to or if it isnt what d i do??

Yup. If you want it to appear on the level you explicitly give it, use FLOAT_LAYER. Or if you want an exact level I'd try MOB_LAYER - 0.5.

Anyway, I've been naughty, so no freebies. =P
In response to Spuzzum
ok thanks again