On my login code, the part that I put bold, dosn't bring to that location...
mob
Login()
loc =locate(185,19,10)
mob
var
health = 0
max_health = 0
magic = 0
max_magic = 0
mob/mobs.Humans
icon = 'Mob.dmi'
icon_state = "1"
Click()
usr.health = 200
usr.max_health = 200
usr.icon = 'Mob.dmi'
usr.icon_state = "1"
usr.magic = 20
usr.max_magic = 22
usr.start()
mob/mobs.Sriknars
icon = 'Mob.dmi'
icon_state = "2"
Click()
usr.health = 200
usr.max_health = 200
usr.icon = 'Mob.dmi'
usr.icon_state = "2"
usr.magic = 22
usr.max_magic = 35
usr.start()
mob/mobs.Klinrens
icon = 'Mob.dmi'
icon_state = "3"
Click()
usr.health = 200
usr.max_health = 200
usr.icon = 'Mob.dmi'
usr.icon_state = "3"
usr.magic = 19
usr.max_magic = 24
usr.start()
mob
Stat()
statpanel("::[usr] Status::")
stat("Health","[health]/[max_health]")
stat("Magic Energy","[magic]/[max_magic]")
mob
proc
start()
loc =locate(29,5,1)
why dosn't it bring me there?
ID:172818
![]() Mar 23 2004, 12:43 pm
|
|
Krew wrote:
why dosn't it bring me there? Because you diddn't actually specify WHO gets sent. Im pretty sure if you dont specify it defaults to usr, and in some cases it might actually move some one elses mob for no reason. Also why must you use a proc for doing this? you could just locate them to wherever in the proc its from or if you want to stick with your way do somthing like; mob/proc/Locate(var/X=29,var/Y=5,var/Z=1,var/Message) src.loc=locate(X,Y,Z) if(Message) src<<Message By default it will send them to your starting location, but you can use the arguments and replace some of that so you dont have to do it over if you have them appearing in multiple places sometimes. eg; src.Locate(1,10,1,"You move suddenly") |
Edit: Take the nasty proc out and wack the loc = w.e where you called start=).Aint I on form tonight