Jump to content

Killer Dryke

Resident
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Killer Dryke

  1. Within Second Life, I am creating a retractable forearm blade, using a llSetPos script in order to deploy and retract the blade, and a llSetScale script in order to allow the blade to fit in the sheath, and grow as it comes out. The script works in sync with no issues, however, I would like to know if it is possible to have the llSetPos script check the position of the blade, in order to prevent retracting while it's already retracted, or from deploying while it's already deployed, causing the blade to come off it's "track." (even though it's easily fixable) Here is my script so far (I'm a novice scripter, and made this script as a derivation from another one, it works fine, but some parts may be unnecessary) init() { key owner = llGetOwner(); llListen(73, "",llGetOwner(), ""); } default { state_entry() { init(); } on_rez(integer start_param) { init(); } listen( integer channel, string name, key id, string message ) { if( message == "knife_retract" ) { llMessageLinked(LINK_SET, 0, "shrink", id); llSetPos(llGetLocalPos() - <0,.0148,.3134>); } if( message == "knife_deploy" ) { llMessageLinked(LINK_SET, 0, "grow", id); llSetPos(llGetLocalPos() + <0,.0148,.3143>); } }}
×
×
  • Create New...