rezTriangle(vector pos, vector rot) { llRezAtRoot("triangle", pos, <0.0, 0.0, 0.0>, llEuler2Rot(rot), 0); } rezTriangles() { vector p = llGetPos(); rezTriangle(p + <-2.88675, 0.0, 2.04124>, <0.0, -0.95532, 0.0>); rezTriangle(p + < 2.88675, 0.0, 2.04124>, <0.0, PI+0.95532, 0.0>); rezTriangle(p + <0.0,-2.88675, 2.04124>, < 0.95532, 0.0, PI_BY_TWO>); rezTriangle(p + <0.0, 2.88675, 2.04124>, <-0.95532, 0.0, -PI_BY_TWO>); rezTriangle(p + <-2.88675, 0.0, -2.04124>, <0.0, 0.95532, 0.0>); rezTriangle(p + < 2.88675, 0.0, -2.04124>, <0.0, PI-0.95532, 0.0>); rezTriangle(p + <0.0,-2.88675, -2.04124>, <-0.95532, 0.0, PI_BY_TWO>); rezTriangle(p + <0.0, 2.88675, -2.04124>, < 0.95532, 0.0, -PI_BY_TWO>); } setInvisible() { llSetScale(<0.01, 0.01, 0.01>); llSetAlpha(0.0, ALL_SIDES); } default { state_entry() { } touch_start(integer total_number) { llRequestPermissions(llGetOwner(), PERMISSION_CHANGE_LINKS); } run_time_permissions(integer perm) { if (perm & PERMISSION_CHANGE_LINKS) { rezTriangles(); setInvisible(); } } object_rez(key id) { llCreateLink(id, TRUE); } } |
Tags: programming, second_life