ID:1565991
 
Keywords: command, commands, macro, tile
(See the best response by Ss4toby.)
I want to macro the tile beneath your character with the .click verb. But I don't know how to use it properly like that.

In this game, we have many different tiles, but I want to have a common command to press the tile which is always beneath you, no matter if it's "Grass", "Sand" or w/e.

Maybe we use some x,y co-ordinates? If so how?
Is this as a developer or as a programmer? I don't believe you can set macros to this precision so it would need to be setup to do this in the code.
Best response
To do something like this, you would need to create a verb that clicks the atom. I'm not sure if you are using turfs (based on your description, you should be). If this is the case, setting a macro to the code below should work how you wish.

mob/verb/clickLocate()
set hidden = 1//make macro invisible
var/turf/t = loc//assign the source's location to a variable
if(isturf(t))//Make sure their location is in fact a turf
t.Click()//Call the click procedure


A rather basic script. If you have objects, it could prove bothersome because there can be more then one in a location. It is do-able using locate(/obj), but would not act naturally meaning it would simply return the first obj it finds.