fumanshoo Posted January 12, 2013 Share Posted January 12, 2013 I am trying to spawn a model by clicking. I expected it would be something as simple as if KeyDown (MOUSE_LEFT)==1 then LoadMesh (blah blah blah) end why can't I click? Quote Link to comment Share on other sites More sharing options...
macklebee Posted January 12, 2013 Share Posted January 12, 2013 if MouseHit(1)==1 then LoadMesh (blah blah blah) end look at MouseHit(#) where (1) is Left mouse click, (2) is Right mouse click, and (3) is Middle mouse click. the values defined in the keycodes.lua script can be used in the MouseHit/MouseDown commands... if MouseHit(MOUSE_LEFT)==1 then LoadMesh (blah blah blah) end Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
fumanshoo Posted January 12, 2013 Author Share Posted January 12, 2013 Thank you! Quote Link to comment Share on other sites More sharing options...
Rekindled Phoenix Posted January 12, 2013 Share Posted January 12, 2013 This enumeration (in C#) might be helpful within your code public enum MouseButton { None = 0, Left, Right, Middle, Aux } For clarity and easier code, I would recommend making an enumeration for each set that you commonly use. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.