tosfera Posted November 13, 2013 Share Posted November 13, 2013 Hi, I'm trying to see if I can get an interaction working with some objects. It's going quite good but, not every object will be returned as an object type. The processLineOfSight doesn't return an 'object' as type while hovering my mouse over it. sample code from the wiki; local w, h = guiGetScreenSize () local tx, ty, tz = getWorldFromScreenPosition ( w/2, h/2, 50 ) local px, py, pz = getCameraMatrix() hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, tx, ty, tz ) if hit then outputChatBox ( "Looking at " .. x .. ", " .. y .. ", " .. z ) if elementHit then outputChatBox ( "Hit element " .. getElementType(elementHit) ) end end So, is there any way to let your cursor or client or server to reconise these objects while creating a preocess line? ( it's about object; 2813, 2816, 2824 and a few more ) thanks Link to comment
Dealman Posted November 13, 2013 Share Posted November 13, 2013 getPedTarget Edit: Just re-read and post while not in zombie-mode. You'll want to take a look at the Editor since it returns the object ID when you're looking at it with your mouse. Link to comment
tosfera Posted November 13, 2013 Author Share Posted November 13, 2013 That's the point, when you spawned these books ( obj 2813 for example ) you can't click on it to select it. That's why the game doesn't return an valid object either. Only way to remove these books would be CTRL+Z or the 'all elements' tab. :\ Link to comment
Dealman Posted November 13, 2013 Share Posted November 13, 2013 Correct me if I'm wrong, but while in the editor - when you press E, your crosshair should become red. Doesn't that help in selecting otherwise un-selectable objects? Link to comment
tosfera Posted November 13, 2013 Author Share Posted November 13, 2013 Correct me if I'm wrong, but while in the editor - when you press E, your crosshair should become red. Doesn't that help in selecting otherwise un-selectable objects? it does work with the E. What is this bind doing with the cursor in the editor? O_O edit1; high_sensitivity_mode, I see. time to find out how to enable this by default Link to comment
tosfera Posted November 14, 2013 Author Share Posted November 14, 2013 Bumping this, still looking for the 'high_sensitivity_mode' thing for my cursor. :3 Link to comment
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