ID:263731
 
Code:
mob
verb
Dig(T as turf in oview(1))
set hidden=1
if(ispath(T, /turf/wall))
src.frozen=1
sleep(50)
del T
if(prob(25))
src.rrocks++
else
src.rocks++
src.frozen=0


Problem description:
I haven't been coding on BYOND for awhile, so this may seem a bit newbish.. Anyway, the verb never starts, probably because I'm not using ispath correctly. Help, please?

you have it set to hidden...
are you executing the verb somehow?
In response to Falacy
Yes, I'm executing the verb through a click.
turf
wall
icon_state="wall"
density=1
Click()
world << "1"//This is solely for debug, and yes it shows up.
usr.Dig()
In response to Eternal_Dread
does it ask you to pick a turf when you click the wall?
usr.Dig(src)

try doing that in the Click() o.O
In response to Falacy
It doesn't seem to make a difference.
In response to Eternal_Dread
mob
verb
Dig(turf/T as turf in oview(1))
set hidden=1
if(istype(T, /turf/wall))
src.frozen=1
del T
if(prob(25))
src.rrocks++
else
src.rocks++
sleep(50)
src.frozen


though acording to the byond help files, ispath() should have worked there, but you have to run it on T.type, so i just changed it to istype(), anddd, moved your sleep(50) towards the end,
also i didnt change this, but i wouldnt recomend deleting a turf

EDIT: also, it doesnt seem to work unless you do usr.Dig(src) in the Click()
In response to Falacy
The turf is deleted, but it's replaced by the default turf for the world that I set, so I use it as a shortcut. Thanks, everything works now.
In response to Eternal_Dread
1. deleting a turf is a bad idea because theres no way to replace it really, yes it gets replaced by the default, but if you want to put the wall back you cant (not that i know of at least)

2. id recomend changing this to mob/proc instead of mob/verb, though with the way youre using it it wouldnt make much of a difference, but in general, things like this are procs, not verbs