nnve Posted February 18, 2021 Report Share Posted February 18, 2021 (edited) Hello. What is the simplest way to check with C# code the current position of mouse cursor, on the game screen (while holding Alt)? Ive looked through the forum, API documentation and inside open source mods. Found out actually, that theres some solution for it in the ICoreClientAPI interface, but unfortunately i dont understand how to use it properly in my code. My point was to be able to check the current mouse position inside the "OnHeldInteractStep" method (while holding alt + right mouse click). But i cant properly figure out, how to access "ICoreClientAPI" interface in "OnHeldInteractStep" method. Im sorry if the problem sounds obvious - im not very experienced in the C# language, just trying to learn more about creating mods for the Vintage Story. Would really appreciate if someone could help or point me into the right direction. Thanks EDIT: Topic can be closed. Found proper solution to my problem, while watching through the different scripts and examples once again. If someone struggle with similar problem, i would recommend checking and analyzing the sources of official mod examples, which are available here: https://github.com/anegostudios/vstutorialmods and https://github.com/anegostudios/vsmodexamples Edited February 19, 2021 by nnve Link to comment Share on other sites More sharing options...
Recommended Posts