ID:2782263
 
(See the best response by Kaiochao.)
I'm currently trying to "force" a client to Click() on things that they're hovering over, but I'm not sure on how to get a reference for that atom they're actually hovering over.

For an example, let's pretend we're in a really messy bedroom full of different /objs with different sprites. Many objects are on the same tile and have the same tile bounds, but have different pixel sizes. I want the player to delete that object when they hover over it about every second, but it can happen faster if they actually click normally.

What I'm asking is, how do I get that atom reference for what the client is hovering over?
Best response
When a client's mouse starts hovering over an atom, client.MouseEntered(atom, ...) is called, which by default (like the other mouse procs) calls atom.MouseEntered(...). You can override that to refer to the atom hovered over. Store it on the client if you need it later.
That's actually useful to know, but I need to provide more context because I didn't know that sort of thing existed.

Essentially I'm trying to do some sort of TAS-related thing in SS13, just for coding fun and nothing really serious, which records input and plays it back, and I'm having trouble clicking on things when playing back recordings. I'm saving the mouse position the client has, and when playing it back I'm restoring the position but I'm not sure how to get the atom depending on the mouse location in the parameters.