Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Does Dialogue Require a Touch Start ??

Da5id Zsigmond
Registered User
Join date: 26 Jan 2007
Posts: 34
05-02-2007 16:39
The only way I've gotten Dialogue to come up is to put it in a touch start event.
Tried putting it in the state entry but just doesn't happen.

The structure of the script has a number of states so it enters a state and needs another touch event to get the dialogue working - do I have to hack it and put an event in the state entry whereby the script touches itself??

Any help on this appreciated - I may be working on erroneous conceptual information.
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
05-02-2007 16:51
Nope it doesn't require a touch event to pop up.

But, if its state_entry, make sure you are passing it a valid key.
llDetectedKey(0) would probably not be valid at that point.
llGetOwner() might be better.
Da5id Zsigmond
Registered User
Join date: 26 Jan 2007
Posts: 34
That's what I was doing
05-02-2007 17:35
I was using the DetectedKey(0) and looking at the wiki I can see why it doesn't come up on state entry. I guess if I want the Dialogue to come up for other than the owner I'll have to get the key I need from the original touch and pass it to the other states via a global variable.
Thanks.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
05-02-2007 19:35
doesnt work with detected key becuase detected key only works in certian events such as touch collision sensor
Da5id Zsigmond
Registered User
Join date: 26 Jan 2007
Posts: 34
Now working
05-03-2007 08:42
It was my first script with dialogue so did just use the DetectKey(0) in the Dialogue call. Upon reading the Detect page in the Wiki (closely) I see that only Touchs, Collisions,etc.. actually trigger the Detect function and that happened in the calling state. The solution was to get the touching avatar key in the first touch which starts the script running and then assigned that to a global variable which was used in all the Dialogue calls. This also means that only the avatar that initialized the script can make any changes to it's settings.