Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Calling a menu off of changed

Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
07-14-2006 15:46
I've been trying this for awhile...I have an elevator script (more accurately a turbolift script) that I have been making, and I want to call an llDialog menu when someone sits on a prim.

I've tried putting the call for it to bring up the menu up under the changed line, but for some reason, no matter what I tried, it just would not bring up the menu if the trigger was caused by a sit.

I even tried putting a phantom prim that wasn't linked and even tried linking it to the sit object that would call the menu on collision (with the phantom sitting where they would be inside it when sitting on the object) and it would not work off the sit. If you just walked into it, however, the menu would pop right up.

Anyone have any ideas how to do this? Right now the script works fine except they have to sit on the object and then touch it to get the menu, but I'd really prefer if it did both.
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
07-14-2006 15:56
How does your code look?

Here's how I'd do something like this:
CODE

default {
state_entry() {
// llAvatarOnSitTarget needs a sit target set.
llSitTarget(<0,1,0>, <0,0,0,1>);
}
changed(integer change) {
if (change & CHANGED_LINK) {
key av = llAvatarOnSitTarget();
if (av != NULL_KEY) {
llDialog(av, "Hello There!", [], -1);
}
}
}
}


Hope this helps :)
==Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
07-14-2006 17:41
pretty sure that's how I tried it and it wouldn't work...but I got it to work with your example....wonder what I was doing wrong...I'll look at my code and post back if I just goofed lol
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
07-14-2006 20:18
I was able to get it to work this time *shrug* though I am calling the menu out of a separate script from the sit/animation/etc.

I think maybe I was doing llDetectedKey instead of just avataronsittarget *shrug*

Thanks :)