Added the tree scripts, w/ comments
[ProgettoPaperellaDiGomma.git] / touchSensor.lsl
blob65d59e201264c8bdf56153f63662b5b184dfc71b
1 //originally written by Davide Byron
2 //this code is released under the GPLv3
3 //
4 // Produces E_TOUCH_ID event
5 // An avatar have touched the creature, the avatar key is passed as the key
6 //
7 // the most different actions can be associated with touch, and it should
8 // be considered a good point for the creature, since it was able to attract
9 // a human with it's appearence or behaviour or whatever.
10 // This script notices the touch event, reactions should be specified in other scripts.
12 //dedicated to Mealea, thanks for the passion you put into things and for being able to pass it on to me :)
14 //standard stuff
15 integer E_TOUCH_ID = 7;
20 default
22 //a touch occurred
23 touch_start(integer numberTouchers)
25 integer i = 0;
26 //loop all touchers
27 for( ; i < numberTouchers; i++)
29 //signal the touch event
30 llMessageLinked(LINK_SET, E_TOUCH_ID, "", llDetectedKey(i));