Here's the code I'm using...
Code:
obj/Rock
icon='space.dmi'
icon_state="rock"
name="big fat rock..."
verb
killrock1()
set src in view(1) //for rocks within 1 square of player
del src //delete rock
Problem description: I have to click the verb once for each rock I want to delete. What I really want is for all rocks to be deleted with a single click (could be as many as 9 rocks: one in the user's square and one in each surrounding square).
I've tried for loops, while loops, playing around with various versions of view(distance) and lists based on forums posts... nothing seems to work.
What am I doing wrong? I am just learning, so it's probably something obvious.
I suggest you do something more easy and use the "for" command.
Example:
And when you got the obj located then you can proceed by:
Also for further notice. If you want to use the
Then type is as "set src in view(1,usr)" to make sure it takes the 1 tile AROUND the one using the verb. Aka usr.