obj
End
Bump(mob/m)
if(editor)return(1)
if(!(locate(/obj/Coin)in range(200,m)))
m.breathing=200
if(m.testing)
for(var/obj/buttons/Exit/E in m.client.screen)del(E)
m.testing=0
m.z=6
m.loc=locate(/obj/Start)in oview(200)
m.icon_state="normal"
editor=1
m.density=0
m.icon=null
m.client.perspective=MOB_PERSPECTIVE
m.AddButtons()
else
if(m.z==2)
m.z++
m.loc=locate(/obj/Start)in oview(200)
m.icon_state="normal"
m.tutorial=0
return(0)
if(m.z==3)
for(var/obj/buttons/Exit/E in m.client.screen)del(E)
m.loc=locate(10,10,4)
m.tutorial=0
return(0)
var/foundlevel=0
m.level+=1
for(var/V in m.vars)if(V=="level[m.level]")
LoadCode(m.vars[V])
foundlevel=1
break
if(!foundlevel)
for(var/obj/buttons/Exit/E in m.client.screen)del(E)
m.loc=locate(10,10,4)
m.level=0
else
m.jumploc=m.loc
var/obj/Start/S=locate(/obj/Start)in range(m,100)
if(S)
m.loc=S.loc
m.icon_state="normal"
if(!(locate(/obj/Start)in m.loc))m.loc=locate(10,10,4)
m.startlives=m.lives
m.tutorial=0
Problem description:
It's sooo tacky! D:
Well I've had lots of tricky problems before, but this really is the mother of screw-ups. Of all the things wrong with this code... Why doesn't the mob "Bump" the end? I've tried everything, and it refuses to advance levels.
Problem-solving is a fun part of DM, but the more I think about this, the more tempting the outside of my second-story window starts to look... Help meee!
Oh, and also, any suggestions for better ways to do these things would be GREATLY appreciated.
..() // you forgot to call this.