Alexus Minotaur Posted March 22, 2018 Share Posted March 22, 2018 Hello everybody, I have several years in SL but I'm just starting to learn the LSL. I was wondering if it's possible to use the load url function but trigger it only when an user is sit on an object. For example the user sits on a chair and the url popup window appears. Any idea how to do this? Thanks. Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 23, 2018 Share Posted March 23, 2018 Of course. llLoadURL is just another function. You can put it in any event you wish. In this case, put it in the changed event and only activate it if an avatar sits: changed (integer change) { if (change & CHANGED_LINK) { key kAv = llAvatarOnSitTarget(); if ( kAv != NULL_KEY) { llLoadURL (kAv,"My web page", "http://my_webpage.com"); } } } 1 Link to comment Share on other sites More sharing options...
Love Zhaoying Posted March 23, 2018 Share Posted March 23, 2018 (edited) . Edited March 23, 2018 by Love Zhaoying Link to comment Share on other sites More sharing options...
Ruthven Ravenhurst Posted March 23, 2018 Share Posted March 23, 2018 3 minutes ago, Love Zhaoying said: Somewhere in there, you have to compare the combination of played notes to the expected notes. A list in LSL is one way. Wrong post I think ;-) Link to comment Share on other sites More sharing options...
Love Zhaoying Posted March 23, 2018 Share Posted March 23, 2018 23 minutes ago, Ruthven Willenov said: Wrong post I think ;-) Thanks, I have no idea how that happened! Link to comment Share on other sites More sharing options...
Alexus Minotaur Posted March 24, 2018 Author Share Posted March 24, 2018 On 22/3/2018 at 7:07 PM, Rolig Loon said: Of course. llLoadURL is just another function. You can put it in any event you wish. In this case, put it in the changed event and only activate it if an avatar sits: changed (integer change) { if (change & CHANGED_LINK) { key kAv = llAvatarOnSitTarget(); if ( kAv != NULL_KEY) { llLoadURL (kAv,"My web page", "http://my_webpage.com"); } } } Thank you for your answer @Rolig Loon. I tried your example but nothing happens. Maybe I'm doing something wrong? I added the default { at the begining to properly run your script. Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 24, 2018 Share Posted March 24, 2018 That's not a complete script. It wasn't intended to be. I simply gave you an example of how to handle the changed event in your own script, since that's the part you asked about. Link to comment Share on other sites More sharing options...
Alexus Minotaur Posted March 28, 2018 Author Share Posted March 28, 2018 Oh ok @Rolig Loon, I just figuret out and solved it. Thank you! 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 28, 2018 Share Posted March 28, 2018 Yay team! 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