ID:142799
 
Code:
mob/verb
Attack()
set category = "Skills"
for(var/atom/N as mob|turf in get_step(src, src.dir))
if(src.move == 1)
if(src.Stamina > 1)
if(!src.Attacking)
if(ismob(N))
var/mob/M = N
if(M.KOed)
return


Problem description: Alright basically, it -cant- detect turf. If I go an try to attack a dense turf, nothing. Same with just attacking grass. It works if I attack a mob, though. Yes, I know I have if(ismob(N)). It still wont work with if(isturf(N)). I've tried doing Attack(N as mob|turf in view()) and that works. So I believe the problem is within the for() proc or the get_step() proc is stopping me from attacking a turf somehow. Thanks.

You're checking for objects in the turf, not the turf itself. If you want to check the turf, skip the for loop and just refer to the results of the get_step() as the turf.

And you don't need the 'as mob|turf' part in anything except verb arguments.
In response to Foomer
Ah, thank you. I've got it working now.