|
Morris Mertel
Registered User
Join date: 2 Mar 2007
Posts: 32
|
12-11-2007 04:33
I tried to find it but didn't, it's proparbly asked a trillion times, i don't even know how it's called but i give it a trie:
i've made an structure with a poseball, and if i click the poseball i want to change 2 prims in the structure. So i want 1 prim be invisible an the other visible, when i use the poseball it must be the other way round (visible/invisible)... is this possible???
Thanks
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
12-11-2007 04:55
yes, do this integer vis;
default { state_entry() { vis = TRUE; touch_start(integer touch) { if(vis == TRUE) { llSetAlpha(0,ALL_SIDES); vis = FALSE; } else if(vis == FALSE) { llSetAlpha(1,ALL_SIDES); vis = TRUE; } } }
that should do it, im not in world atm to test it, atmost there is just a few minior errors and for the other prim you can reverse the 1 and 0 in llSetAlpha and use a link message, on command have the other prim turn inv or visable
|
|
Morris Mertel
Registered User
Join date: 2 Mar 2007
Posts: 32
|
12-11-2007 05:40
Thanks so far  ... there is an error and my scripting skills are almost zerro...
|
|
Laurence Corleone
Registered User
Join date: 12 Oct 2006
Posts: 126
|
12-11-2007 06:47
A curly bracket was missing. integer vis; default { state_entry() { vis = TRUE; } touch_start(integer touch) { if(vis == TRUE) { llSetAlpha(0,ALL_SIDES); vis = FALSE; } else if(vis == FALSE) { llSetAlpha(1,ALL_SIDES); vis = TRUE; } } }
_____________________
There are no stupid questions, just stupid people.
|
|
Morris Mertel
Registered User
Join date: 2 Mar 2007
Posts: 32
|
12-11-2007 07:10
Thanks verry much... as soon as we can login again i gonna give it a try... Big THANKS!
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
12-11-2007 13:10
as i said before, i wosent able to get in sl for a wile + downtime atm didnt help, atleast it was only a little bit of a error, one of the key tricks to learning lsl is looking at freebie scripts studying them and looking up there funutions on wiki
wiki.secondlife.com
that is one of the best ways i found out on how to learn lsl, take it slow and learn what it takes for what your building ect, and yes this is a random post,
/me waits for grid to get its switch turned on
|
|
Morris Mertel
Registered User
Join date: 2 Mar 2007
Posts: 32
|
12-13-2007 08:11
hmmm it seems i can't get it working the way i want it... I try to explain it again: I've made a gallow pole with a hanging pose and made two knots, the 1st hanging down (for when nobody's dangle) and the 2nd for arround the neck, but want them to show one at a time... Now i want the 1st knot showing when nobody's dangle and the 2nd is invisible, when sombody is using the poseball, and is gonna dangle, i want the 1st knot dissappear and the 2nd knot (arround the neck) appear... When he/she jumps off 1st showing 2nd dissappear again... Sorry if it's confussing, my english is not that well...  But thanks for even reading my post 
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
12-13-2007 08:26
i get what you mean, forget what it is called but something about changed links, when avatar go on pose ball it will send a linked message to the 1st not to turn alpha (inviable) and 2nd not to turn visable, and when you get off it sends a messge for bot 1 to turn vis and not 2 invisable EDIT: changed(integer change) { if (change & CHANGED_LINK) { key agent = llAvatarOnSitTarget(); if (agent) { // link message to tell knots what to do // avatar on poseball } else { // link message to tell knots what to do // avatar gets off } } }
try using that
|