|
Tetrae Turner
Registered User
Join date: 14 Sep 2005
Posts: 36
|
04-09-2008 06:27
I know this sounds goofy, but I'd like to make a large lolipop with a knife blade that slides out the top when you click on it. I've got all the pieces made, the sucker, the stick, and the blade segment. I can link the sucker and stick, but when I try to link the blade, either the entire piece slides to one side, or nothing happens at all. I'm using an old sliding door/control button script I've had for awhile. Is there a better way of doing this that'll work the blade and still let me carry the thing around with me?
Any help would be appreciated.
|
|
Daten Thielt
Registered User
Join date: 1 Dec 2006
Posts: 104
|
04-09-2008 09:36
remove the door script its to much for such a simple job, just do the following 1. in the blade put the following in state_entry() llSay(0, (string)llGetLocalPos()); make sure the blade is in and save the script that should give you some cordanates jot them down some where 2. pull the blade out manualy and reset the script tha will give you another set of coranates, jot them down some where the first set of cordanates are going to be called in, the second set will be called out so just fill in the data vector in = <Your in vector>; vector out = <Your out vector>;
integeer in = FALSE; //dont need to touch this
default { state_entry() { llSetPos(in); } touch_start(integer t) { if(in == FALSE) { llSetPos(in); in = TRUE; } else if(in == TRUE) { llSetPos(out); in = TRUE; } } }
WARNING: I did this out of world so there may be a glitch or 2 but that should work fine
|
|
Tetrae Turner
Registered User
Join date: 14 Sep 2005
Posts: 36
|
04-09-2008 20:11
Many thanks for your help!
|