Jump to content

Anton Hammerthall

Resident
  • Posts

    60
  • Joined

  • Last visited

Everything posted by Anton Hammerthall

  1. This is the script i made: default{ state_entry() { llSitTarget(<0.0,0.0,-0.6>, <0,-0.2,0,1>); } touch(integer num_detected) { if(llGetPermissions() & PERMISSION_CHANGE_LINKS) { llBreakLink(LINK_THIS); //llOwnerSay("Delinked from prim"); } //llOwnerSay("Touched"); if(llGetPermissions() & PERMISSION_ATTACH) { llAttachToAvatar(ATTACH_PELVIS); //if permission is set then attach //llOwnerSay("Attach to avatar"); } } changed(integer change) { if(change & CHANGED_LINK) { key av = llAvatarOnSitTarget(); if (av) { llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_CHANGE_LINKS | PERMISSION_ATTACH | PERMISSION_TRIGGER_ANIMATION); } } } run_time_permissions(integer perm) { if(perm & PERMISSION_ATTACH) { llOwnerSay("Attach set"); //for testing purposes } if(perm & PERMISSION_CHANGE_LINKS) { llOwnerSay("Link set"); //for testing purposes } } attach(key Av) { integer perm = llGetPermissions(); if(Av) { llSetStatus(STATUS_PHYSICS , TRUE); llStopAnimation("stand"); llStartAnimation("sit"); llOwnerSay("Attached"); //for testing purposes llPushObject(Av, <0,0,50>, ZERO_VECTOR, FALSE); } else { llStopAnimation("sit"); //on drop/detach stop animation and die() llStartAnimation("stand"); llDie(); } }} It delinks the seat and attach to the pilot. The permissions wil be ask when the pilot gets in the seat
  2. Instead of rezzing a seat in it not possible to use llBreakLink and Attach the seat. Now is the seat the prim. I have no idea if it will work but i will try some things Is it then possible to set permissions to attach before even eject the seat?
  3. Yes I was working on this a long time ago, then i quit second life for a while and now i have more experience with programming and tried finish my plane Setting the temporary variable doenst work, it still gets in you inventory.
  4. The problem with this solution is that you wil get a lot of seats in your inventory. If there is a solution to fix that this might be the best solution.
  5. I have a problem with Requesting Permissions. Let me explain my self. I have a plane that is carrying a ejection seat. When you press a button the ejection seat will be placed in the world and attach to the player. The problem is that is requests permission to attach when the seat is rezzed. Is it possible to request permission when the player get in the plane? My skills with LSL are not very good but i can program in C so i understand the basics. I can post some scrips if needed :P Anton Hammerthall
×
×
  • Create New...