There's a bit of it, sorry. First there is the object code for when it is clicked.
Click()
if(usr.Turn == 1)
if(Safety == 1)
if(src.LandCheck() == 1)
usr << output("You cannot kill on the first turn!","Chat")
return
else
Safety = 0
var/turf/T = usr.loc
T.density = 1
T.icon_state = "destroyed"
usr.Move(src.loc)
spawn(0) usr.Land()
usr.ClearTrackers()
for(var/mob/M in world)
if(M == usr.Foe)
var/mob/P = M
P.Turn = 1
P.Create_Trackers()
When you click the tracker, if it's your turn, you jump to it. And my LandCheck() works fine. The problem is that it doesn't make person's foe create the trackers. Here is the code showing how the foe is set.
var
White // White Player
Black // Black Player
White()
set hidden = 1
if(White)
if(White != src)
src << output("White is taken!","Chat")
if(Black)
src << output("Black is already taken too! You will have to wait until next round!","Chat")
else
src << output("You will have to play as Black","Chat")
Black = src
else
if(Black == src)
Black = null
White = src
for(var/mob/M in world)
M.UpdateWB()
src.CloseColour()
return
Black()
set hidden = 1
if(Black)
if(Black != src)
src << output("Black is taken!","Chat")
if(White)
src << output("White is already taken too! You will have to wait until next round!","Chat")
else
src << output("You will have to play as White","Chat")
White = src
else
if(White == src)
White = null
Black = src
for(var/mob/M in world)
M.UpdateWB()
src.CloseColour()
return
Start()
set hidden = 1
if(Game == 0)
if(White && Black)
for(var/turf/T in block(locate(2,2,1),locate(9,9,1)))
SpawnTurfs += T
for(var/mob/M in world)
if(White == M)
M.icon_state = "w[M.Piece]"
var/turf/P = pick(SpawnTurfs)
SpawnTurfs -= P
M.Move(P)
M.Foe = Black
if(Black == M)
M.icon_state = "b[M.Piece]"
var/turf/P = pick(SpawnTurfs)
SpawnTurfs -= P
M.Move(P)
M.Foe = White
Problem description:
(Hmmm, I should probably handle the moving with a player verb now that I think of it...) Anyway the person joins and their mob becomes White or Black. When the game starts, their foe is set to that mob. Which brings us back to my object code, me trying to make the foe do something.
What is this?
You are not being very clear on what you want in the first place.