unique kantilope Posted December 10, 2015 Share Posted December 10, 2015 ok, so im still very new to lua and modding in general. and despite my best efforts i cannot find an example in other mods to blatantly steal from. i want the character im working on to be able to ignite things at a distance. on key-press it would try to ignite whatever the mouse is hovering over. i've stolen most of what is needed from the games files for the fire staff. but i need a way to track what(ifanything) the mouse is hovering over. Link to comment https://forums.kleientertainment.com/forums/topic/60585-need-help-with-tracking-mouse-hover/ Share on other sites More sharing options...
Mobbstar Posted December 10, 2015 Share Posted December 10, 2015 TheInput:GetWorldEntityUnderMouse() The line above returns whatever prefab the player would click on if they were to click. (this also includes prefabs without valid actions, but not prefabs without hitbox or the "noclick" tag) Link to comment https://forums.kleientertainment.com/forums/topic/60585-need-help-with-tracking-mouse-hover/#findComment-695868 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now