P.S. I have the "E" var set to 1 so it will make me transfer. Just for testing.
P.S2. I will change usr to something like M later. Unless this is the problem.
turf
BattleGrass1
icon = 'turfs.dmi'
icon_state = "grass"
density = 0
Enter(atom/movable/A)
if(!usr.Bnum)
var
E = 1
if(E == 1)
A.battle1()
return 1
Bgrounds
icon = 'turfs.dmi'
icon_state = "blackness"
atom/proc
battle1(mob/Enemy)
var/turf/Map
var/usrloc = usr.loc
if(usr.inbattle == 0)
for(var/turf/bgrounds in world)
var/Taken=0
for(var/atom/A in bgrounds)
if(A.density==1)Taken=1
if(!Taken)
Map=bgrounds
if(Taken == 1)
Map=usrloc
usr.XLoc=usr.x
usr.YLoc=usr.y
usr.ZLoc=usr.z
usr.battle = 1
usr.Move(Map)
Theres more code below it, but thats battle stuff. This code dosn't work. Anyone know why?
Airjoe
And, also...DON'T use "usr" in procs...use src, or define an argument.