BlackMagi Darkwatch Posted January 9, 2014 Share Posted January 9, 2014 I was wondering if there was a way to hide the default icon for click action on a prim with a touch event in the script. I have tried llSetClickAction(CLICK_ACTION_NONE) but it still shows the hand icon. I note that CLICK_ACTION_NONE & CLICK_ACTION_TOUCH have the same integer number. This is for a maze build and it sort of gives the game away if all a user needs to do is mouse over the prims to find a door.Thank youBlack Link to comment Share on other sites More sharing options...
Freya Mokusei Posted January 9, 2014 Share Posted January 9, 2014 I can't think of a way to consistantly deliver this behaviour - if memory serves touch-enabled objects also show up as beacons, and they can show up for people using sensors for type ACTIVE. I can think of a couple of workarounds:- You could use two states, and only activate the state with the touch event when someone is nearby (using a sensor in the first state - the state with no touch event) - or some other predetermined condition that otherwise obscures the true nature of the object. Make all (or many) objects touch-enabled. Create a script with a touch event that produces no output and use this as a 'dummy' - use it in several objects nearby to throw users off of the scent. Link to comment Share on other sites More sharing options...
Innula Zenovka Posted January 9, 2014 Share Posted January 9, 2014 How about having the touch event in a state touchable which is entered only if the avatar is within one metre of the door (either with a sensor or a collision prim)? That way, the icon will only be visible if the avatar is right on top of the door. Link to comment Share on other sites More sharing options...
BlackMagi Darkwatch Posted January 9, 2014 Author Share Posted January 9, 2014 Thank you Freya & Innula - the sensor idea sounds like a great workaround and one I probably wouldn't had thought of! Black Link to comment Share on other sites More sharing options...
LepreKhaun Posted January 9, 2014 Share Posted January 9, 2014 llSetClickAction(-1); Understanding the why and how of that is grokking LSL. Link to comment Share on other sites More sharing options...
BlackMagi Darkwatch Posted January 9, 2014 Author Share Posted January 9, 2014 As good as I think the sensor idea is, this is going to be way more efficient. I don't pretend to know everything so would be interested in learning why this works as I would have thought that entering anything other than one of the defined constants would have broken the function? Black Link to comment Share on other sites More sharing options...
Rolig Loon Posted January 9, 2014 Share Posted January 9, 2014 Gee .... I haven't grokked since 1968. Do people still do that in this strange land? :smileyvery-happy: Link to comment Share on other sites More sharing options...
LepreKhaun Posted January 9, 2014 Share Posted January 9, 2014 As a general rule, LSL functions don't do range checking, if you enter a value that's out of bounds, it silently fails (no error message is said and things continue as usual). As it happens, this particular function silently fails in a predictable way. When it's called, it initially unsets the ON_CLICK parameter for the object. When it finds that the supplied integer is out of range, it silently fails to do anything else and returns, leaving the object in the state you wanted. The object can have a multitude of scripts, all having touch events that will work normally. If just one of them calls llSetClickAction('some nonsense integer'); the ON_CLICK action is unset. [ETA: I suppose, technically speaking, it's the ON_MOUSE_HOVER parameter that is being affected since the touch event handler(s) within the object will still be triggered normally.] Link to comment Share on other sites More sharing options...
LepreKhaun Posted January 9, 2014 Share Posted January 9, 2014 I actually have a cigar box next to my front door with change and bills in it. It's been in that spot for decades and through many changes of residences. It's never been emptied but I did once have to "find" a 20 on the floor for a good cause. It was repaid back within a month, plus. Link to comment Share on other sites More sharing options...
BlackMagi Darkwatch Posted January 9, 2014 Author Share Posted January 9, 2014 Thank you for taking the time to explain, I do appreciate it - this works like a charm Link to comment Share on other sites More sharing options...
LepreKhaun Posted January 9, 2014 Share Posted January 9, 2014 always a pleasure Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now