Hi,
I suggest add a new API is LuaPlayer like this:
```
LuaPlayer.get_cursor_surface_location() -> Position
```
Or:
add a new surface_position parameter to user's custom input event that involves cursor clicking.
This makes a lot of operations possible, such as let player go to x,y location, or put a series of marker on ground base of user's cursor location.
Thanks
Request to add API of getting user's mouse location on surface
- NotRexButCaesar
- Smart Inserter
- Posts: 1133
- Joined: Sun Feb 16, 2020 12:47 am
- Contact:
Re: Request to add API of getting user's mouse location on surface
+1
Ⅲ—Crevez, chiens, si vous n'étes pas contents!
Re: Request to add API of getting user's mouse location on surface
Ok, I added "cursor_position" to all custom-input events.
If you want to get ahold of me I'm almost always on Discord.
- NotRexButCaesar
- Smart Inserter
- Posts: 1133
- Joined: Sun Feb 16, 2020 12:47 am
- Contact:
Re: Request to add API of getting user's mouse location on surface
You guys are the best!
Ⅲ—Crevez, chiens, si vous n'étes pas contents!
Re: Request to add API of getting user's mouse location on surface
This is amazing, and thank you!
While this will work for a huge variety of usecases, it won't work for my specific usecase: dragging. I'll still have to resort to using capsules (which don't work on the map view) in order to facilitate this.
The only way to suit my usecase would be to have an option to repeatedly fire the custom input if it is held down, so I can read changes in the position. So, I don't expect it to be possible, but may as well ask! Thank you again.
While this will work for a huge variety of usecases, it won't work for my specific usecase: dragging. I'll still have to resort to using capsules (which don't work on the map view) in order to facilitate this.
The only way to suit my usecase would be to have an option to repeatedly fire the custom input if it is held down, so I can read changes in the position. So, I don't expect it to be possible, but may as well ask! Thank you again.
Don't forget, you're here forever.