Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Using keyboard input

Allan Beltran
Registered User
Join date: 2 Dec 2006
Posts: 52
01-03-2007 06:29
I'm using a HUD system to manipulate several objects, one at a time.

I've made it so that when I click on an item, it listens on a channel for 20 seconds for any commands from the HUD. The timer resets to 20 seconds after each command, to give the user plenty of time to carry out actions on the object that is currently listening. I also have a function on the HUD that can tell the current object to stop listening. If no commands are given within the 20 seconds, the object automaticaly stops listening.

I also made it so that when an object is clicked to listen, that object shouts to all other objects to stop listening so they don't carry out commands I intend for another object.

However, I've discovered the need to be able to have several objects listen at the same time. Like when I want to move a group of objects as a unit via the HUD.

What I'd like to do is just tell the touched object to not shout out the "Stop all others" command when the SHIFT key is pressed while being touched. This way, the timers are not affected and each object will carry out the next command issued by the HUD.

I can't seem to find any functions relating to key trapping.
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
01-03-2007 10:10
the short answer: It's not possible to do what you want because you can only have scripts act on movement keys and mouse clicks.

you might want to put a "shift" button on your hud that when turned on allows for mutiple objects to be manipulated at once.
_____________________
My SLExchange shop

Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not.


The function is working perfectly fine. It's just not working the way you wanted it to work.
Allan Beltran
Registered User
Join date: 2 Dec 2006
Posts: 52
01-03-2007 11:20
From: Senuka Harbinger
the short answer: It's not possible to do what you want because you can only have scripts act on movement keys and mouse clicks.

you might want to put a "shift" button on your hud that when turned on allows for mutiple objects to be manipulated at once.
That's what I was afraid of.

I guess a "SHIFT" command could be used to tell the currently selected object to ignore all "Stop all others" commands from touched objects. A bit of forward thinking on my part, since the standard stop command from the HUD is of course, "STOP". So I'll still be able to tell all selected pieces to stop listening when I'm done with them, since they will all still be listening to the HUD.

The only drawback is that I'll have to click the "SHIFT" for each object to tell it to ignore the "Stop all others" commands until further notice. Sort of doubling my clicks here, but oh well. I can live with it.

Thanks for the help.

EDIT: I would use an "always on" listen routine, but I'm dealing with like 30-40 objects at a time, and I wouldn't want them all listening at the time. If it were only 1 - 3, I would though.

EDIT2: I guess I COULD keep the HUD always listening. The have each object send out a message saying that it has been touched, and then the HUD can send a response about the "SHIFT" status, as well as other settings that I may find useful, like move increments and such... hmmm.