ID:163302
 
okay, how would i make a sliding puzzle? i know it would be sorta like this...

mob
proc
slide(turf/T in get_step(1))
//'go to the empty space' code here


that was just an example, dont get all hyped up because i missed stuff or something... :/

i've got the turf down, i just need the proc and the Click() proc... could someone give me an example? thanks in advance! :)
You could make each of the little squares of a certain type that when you clicked them it checked in all four directions for a spot that didn't have a dense object or turf, then move the block over. I'm not sure how I would handle the part where its correct, that would involve thinking and I don't much feel like it.

var/dirs = list(NORTH,SOUTH,EAST,WEST)
obj/LittleSquare
Click()
for(var/x in dirs)
var/turf/T = get_step(src, x)
if(T.Enter(src))
step(src, x)


Thats how I would handle the click and move at least...

Hope it helps
In response to KirbyAllStar
that's actually what i was thinking of doing, but i didn't know how to do it. thanks! :)