Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

control func's parameters

Vertigo Miles
Registered User
Join date: 31 Mar 2007
Posts: 12
04-05-2007 06:38
Hi,

Can anyone tell me what is the exact use of control function's parameters?

control( key id, integer level, integer edge );

I have this script that uses this event and I can't figure out why this function will be called twice even if I pressed the keys once(not held), It may be because of these parameters not used. I can't find an explanation for its parameters in the wiki...Thanks.
_____________________
"We have artists with no scientific knowledge and scientists with no
artistic knowledge and both with no spiritual sense of gravity at all,
and the result is not just bad, it is ghastly"
(Time for real reunification of art and technology is really long
overdue)
- R. Pirsig
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
04-05-2007 06:44
From: Vertigo Miles
Hi,

Can anyone tell me what is the exact use of control function's parameters?

control( key id, integer level, integer edge );

I have this script that uses this event and I can't figure out why this function will be called twice even if I pressed the keys once(not held), It may be because of these parameters not used. I can't find an explanation for its parameters in the wiki...Thanks.



The event will be raised once when the key is pressed and once when released so tehre for it triggers twice.

The parameters allow you to know what was pressed or held.
Vertigo Miles
Registered User
Join date: 31 Mar 2007
Posts: 12
press, release, held
04-05-2007 18:10
Thanks for your reply, I know now the uses of these parameters. They are just masks for the different states of the key.
_____________________
"We have artists with no scientific knowledge and scientists with no
artistic knowledge and both with no spiritual sense of gravity at all,
and the result is not just bad, it is ghastly"
(Time for real reunification of art and technology is really long
overdue)
- R. Pirsig