Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

I have LCK scripting questions.

Winza Nakamura
Registered User
Join date: 27 Nov 2007
Posts: 3
05-20-2008 08:20
I have LCK script questions.
Ok, I have been using the LCK scripts to make weapons for a little while and I have a few questions for those of you who I hope can help.

1: I want to learn how to make the hip hilt script only alpha part of an item like alpha the sword but not it's sheath on the avatar's back. What changes do I need to make or rather, what do I need to add to the sheath to make that work?

2: I would also like to learn how to make it so when I activate a weapon, only part of it shows up and then press another button to have the rest of it show up. Example= Weapon activates, and a staff appears in your hand, hit another button, a spear head appears at the business end of the staff making it into a spear. How would I change the scripts or add to them?

3: I would like to make a very short lived particle effect appear when one of these melee weapons connects, but I don't want to use the "saber damager" to do it. What do I add to the main script to make that happen?

I have already looked at the wiki, but none of what I'm looking for is there, so anyone who's willing to shoot me the info, please do.
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
05-20-2008 09:09
Am I the only one who don't know what LCK scripts are?
Please fill me in!
_____________________
From Studio Dora
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
05-20-2008 11:17
Full answers to these questions are more involved and time-consuming than I can afford right now, but I can give a partial answer...

To make part of the sheathed or drawn weapons visible/hidden, the method that I use is to use llSetLinkAlpha on the individual linked prims. So for question #1 I would use several calls to llSetLinkAlpha, passing in the link numbers for all of the handle prims and ignoring the sheath prims. This gives the impression that only the handle disappears, and looks like the user has drawn the sword.

Similarly, you can use the same method to hide or show a spear point at the end of a staff.

It's easy enough to get the link numbers for each individual prim, and there are multiple ways. Probably the easiest is just to add a script to the weapon that can llOwnerSay the llDetectedLinkNumber in the touch_start event.

See here for more info:
http://wiki.secondlife.com/wiki/LlSetLinkAlpha
http://wiki.secondlife.com/wiki/LlDetectedLinkNumber


.
_____________________
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
05-20-2008 13:20
From: Dora Gustafson
Am I the only one who don't know what LCK scripts are?
Please fill me in!

LCK, I believe, is the "Lightsaber Construction Kit". More than that I do not know, as I script all of my weapons by hand - and I suspect that the things asked here are not ones which can be resolved by the simple changing of a few parameters in a premade script, as Mr Olmstead suggests.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
05-20-2008 15:06
From: Ordinal Malaprop
LCK, I believe, is the "Lightsaber Construction Kit".

If it is an in world brand would not the "Lightsaber Construction Kit" Constructor, be the place to ask instead of a scripting tips forum?

Sorry if I appear to be a crabby bitch...
it is a part of my natural charm.
_____________________
From Studio Dora
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
05-21-2008 00:13
To set parts of a linkset visible/invisible and not have to depend on knowing the link numbers or linking the object in a given order, I recommend naming the prims you wish to hide accordingly (e.g. all the same, but not 'Object'.)

Then you can use a simple loop to go through the linkset and llSetAlpha all prims in the set which have the required name. Or do not have the required name. Or both. Or none.

You can set up "groups" of sorts that way too to make differnt parts of the set show/not show on demand.
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
05-21-2008 09:25
From: Dora Gustafson

Am I the only one who don't know what LCK scripts are?
If it is an in world brand would not the "Lightsaber Construction Kit" Constructor, be the place to ask instead of a scripting tips forum?


LCK scripts are Open Source released under GNU License.

The scripts are freely avaliable in-world from many places, and I have a LCK Light Sabre Collection and HUD (with powerful push!) that I assembled and give away free.

I can not see any reason why someone should not ask for scripting tips on LCK scripts on this forum, or any questions any other legitimately modify scripts for that matter.
_____________________
http://wiki.secondlife.com/wiki/User:debbie_Trilling
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
05-21-2008 10:16
I stand corrected
_____________________
From Studio Dora
Winza Nakamura
Registered User
Join date: 27 Nov 2007
Posts: 3
05-22-2008 13:26
Dora, don't worry, I hold nothing against you, you didn't seem crabby at all. Anyway, thank you, Debbie, Squirrel and everyone else who've posted so far, I can now make my sheath stay visible when I activate the weapon... now I just need to learn how to activate particles on "contact" with another avatar. BTW, I don't make weapons for push or real combat zones, I make them for the combat systems like FFRC, DCS, CoLA, RCS, more or less melee weapons that DO NOT rez objects on swinging them.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
05-22-2008 14:44
I prefer not to fool about with had coded link numbers and instead rely upon scanning the link set for prims with a specific name.

http://wiki.secondlife.com/wiki/llGetLinkName
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
05-22-2008 15:25
From: Strife Onizuka
I prefer not to fool about with had coded link numbers and instead rely upon scanning the link set for prims with a specific name.

Yeah. I tend to either do that, or have a query/response link message protocol. Either makes things quite portable between objects and stable with respect to re-linking.