12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- integer createdObjectCounter;
- integer linkedObjectCounter;
- default
- {
- state_entry()
- {
- llSay( 0, "Hello, Avatar!");
- linkedObjectCounter = 0;
- }
- touch_start(integer total_number)
- {
- if( createdObjectCounter <= 0 )
- {
-
- llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS );
- }
- else
- {
-
- }
- }
-
- run_time_permissions( integer permissions_granted )
- {
- if( permissions_granted == PERMISSION_CHANGE_LINKS )
- {
- llRezObject("Object1", llGetPos() + < 1, 0, 2 >,
- ZERO_VECTOR, ZERO_ROTATION, 42);
- createdObjectCounter = createdObjectCounter + 1;
- llRezObject("Object1", llGetPos() + < -1, 0, 2 >,
- ZERO_VECTOR, ZERO_ROTATION, 42);
- createdObjectCounter = createdObjectCounter + 1;
- }
- else
- {
- llOwnerSay( "Didn't get permission to change links." );
- return;
- }
- }
-
- object_rez( key child_id )
- {
- llOwnerSay( "rez happened and produced object with key " +
- (string)child_id );
-
-
- llCreateLink( child_id, TRUE );
-
-
-
- linkedObjectCounter++;
- if( linkedObjectCounter >= 2 )
- {
-
- llSetLinkColor( LINK_ALL_CHILDREN, < 1, 0, 0 >, ALL_SIDES );
-
-
- llSetLinkAlpha( 2, .5, ALL_SIDES );
-
-
-
- }
- }
- }
|