Jump to content

Simoo0

Resident
  • Posts

    19
  • Joined

  • Last visited

Reputation

18 Good

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks @Wulfie Reanimator, That Fixed my problem!! You are brilliant ^^
  2. that's great ! but how the HUD will know the key of the vehicle ?
  3. I am working on a vehicle that has a Hud all riders can use it, the problem in my script is that I must use a unique channel cause there will be more vehicle in the same region that's why I used this >>> ch1 = (integer)("0xF" + llGetSubString(llGetOwner(),0,6)); but when the rider has HUD on, It will get his key and the channel will be different and the vehicle will not listen to HUD I got a solution for that to create another channel in the vehicle to listen in change event like this >>> ch_fire1 = (integer)("0xF" + llGetSubString(llGetLinkKey(17),0,6)); llGetLinkKey(17) is the key of the second rider but i think it is not the best solution for that ..any ideas on how to fix that and i appreciate your help ^^ ----------------------------- Script in vehicle : integer ch1; state_entry() { llListen(ch1,"","",""); ch1 = (integer)("0xF" + llGetSubString(llGetOwner(),0,6)); } listen(integer channel, string name, key id, string message) { if (llAvatarOnLinkSitTarget(LINK_ROOT) != NULL_KEY) { //Do Things } } ------------------------------------ script in HUD : integer ch1; default { state_entry() { ch1 = (integer)("0xF" + llGetSubString(llGetOwner(),0,6)); } changed(integer change) { if (change & CHANGED_OWNER) { llResetScript(); } } touch_start(integer total_number) { //Detect which button was touched integer button_link = llDetectedLinkNumber(0); integer face = llDetectedTouchFace(0); string button_name = llGetLinkName(button_link); if (button_name == "Task1") { llRegionSay(ch1,"go"); } } }
  4. Thanks All !! I did it like that ^^ ///suppose we have a military car with total prims = 8 , and 2 seaters and we want to change their rules with menu key s1fire; key s2helper; key gk_avatar; string Fireman; string Helper; vector pFireman =<0.30620, 0.00000, 0.65005>; vector pHelper =<1.60828, -0.70000, 0.75005>; rotation gAvRot = ZERO_ROTATION; seat_changer(vector newpos) { if( gk_avatar == s1fire) { llOwnerSay(Fireman+" your position changed"); llSetLinkPrimitiveParamsFast( 9, [PRIM_POS_LOCAL, (newpos)] );} if( gk_avatar == s2helper) { llOwnerSay(Helper+" your position changed"); llSetLinkPrimitiveParamsFast( 10, [PRIM_POS_LOCAL, (newpos)] );} } ///channel settings integer dialogChannel; integer dialogHandle; string subMenu_Adjuster_Dialog = " \nSelect you rule"; list subMenu_Adjuster_Buttons = ["Fireman seat", "Helper sear"]; open_menu(key inputKey, string inputString, list inputList) { dialogChannel = (integer)llFrand(DEBUG_CHANNEL)*-1; dialogHandle = llListen(dialogChannel, "", inputKey, ""); llDialog(inputKey, inputString, inputList, dialogChannel); llSetTimerEvent(30.0); } close_menu() { llSetTimerEvent(0.0);// you can use 0 as well to save memory llListenRemove(dialogHandle); } /// integer GetLinkNumByName(string name) { integer i = llGetNumberOfPrims(); while(i >= 0) { if(llGetLinkName(i) == name) {return i;} i--; } return 1000; } default { state_entry() { llLinkSitTarget(GetLinkNumByName("1"),<0,0,.2>,gAvRot); llLinkSitTarget(GetLinkNumByName("2"),<0,0,.2>,gAvRot); } changed(integer change) { if (change & CHANGED_LINK) //note that it's & and not &&... it's bitwise! { integer i = llGetNumberOfPrims(); if(i = 9) { s1fire = llGetLinkKey(i); Fireman= llKey2Name(s1fire); llOwnerSay(Fireman+ " sit on link 9");} if(i= 10) { s2helper = llGetLinkKey(i); Helper= llKey2Name(s2helper ); llOwnerSay(Helper+ " sit on link 10"); } } } touch_start(integer total_number) { key owner = llGetOwner(); gk_avatar = llDetectedKey(0); open_menu(gk_avatar, subMenu_Adjuster_Dialog, subMenu_Adjuster_Buttons); } listen(integer channel, string name, key id, string message) { if (message == "Fireman seat") { open_menu(gk_avatar, subMenu_Adjuster_Dialog, subMenu_Adjuster_Buttons); seat_changer(pFireman) ; } if (message == "Helper seat") { open_menu(gk_avatar, subMenu_Adjuster_Dialog, subMenu_Adjuster_Buttons); seat_changer(pHelper); } } }
  5. hello everyone, i am trying to make vehicles with 4 seaters , i want to make option to change the seater role ("Driver ","shooter",etc) so i need to change that seater link position so what i am using is llGetNumberOfPrims() that gives me only the last seater link number , so i am asking if there is any way to get the link number of each seater ?
  6. i think we can push the owner of the pet using lllPushObject to the toucher instead of pushing the toucher, like "HUD & Kiss" does , i think this will be better than RLV
  7. I am really not familiar with RLV, plus there is no examples on wiki about how it works
  8. okay Mollymews, I will give the "Grab" to the toucher , when he have it in his/her inventory, can i make it auto attach directly from toucher inventory?
  9. yes Quistess, thats what i do for the (rezz version pet) but for (the weared version) you can't sit on attached prim of another avi
  10. Hello Everyone, what i am trying to do is when others avi touches my pet it grab them to her before doing the animations, what i use is when touching my pet it rezz a prim "Grab" that ask a permission to temp attach to the toucher ,when attached Done , "Grab" use llMoveToTarget and everything is okay. the problem is there are some lands don't allow rezzing, so is there a way to force rezz or do it with a different idea? Thanks for advice,
  11. i have a prim with sensor which can follow me when i call it ,it uses RotLookAt to look in the same rotaion of my AVI but it comes with its back if i look at it , so i used a rotation offset in z by 180 degree to make it comes to me but if i call it while my back to this prim ,it comes with back cant solve this anyone can help i appreciate this example will be used for pet cat this is script in object : //// rotation rot_xyzq; oppisiteRot() { rotation rot = llDetectedRot(0); vector xyz_angles = <0,0,180>; // This is to define a 1 degree change vector angles_in_radians = xyz_angles*DEG_TO_RAD; // Change to Radians rot_xyzq = llEuler2Rot(angles_in_radians); llRotLookAt(rot*rot_xyzq, .1 , 1); } default { state_entry() { llSetStatus(STATUS_PHYSICS, TRUE); } touch_start(integer num_detected) { vector pos = llGetPos(); // Look for owner within 20 meters in 360 degree arc every 1 seconds. llSensorRepeat("", llGetOwner(), AGENT, 20.0, PI,1.0); } sensor(integer total_number) { oppisiteRot(); vector pos = llDetectedPos(0); // Offset back one meter in X and up one meter in Z based on world coordinates. vector offset =<-1,0,1>; // offset = offset*llDetectedRot(0); //Adding this line will orient the follower relative to the owner's position. pos+=offset; llMoveToTarget(pos,0.4); } }
  12. Oh thank you ! i did my project but i am trying to make more updates to make low size script but i am okay i will try making list also ty for always being help for us, I really appreciate that 🤞 =))
  13. I tried to apply this in world but it didn't work , i put the prim description between bracktes whatever prim name i let it Object by default and the script should disappear all prims with the same description but it didn't , I don't know why 🤔 if (strLinkName == "the_special_code_I_have_put_into the_Link_I_am_looking_for")
  14. I created more than prims and Linked them together and it should All prims that have in its Description field "New" for example .. should be transparent , but it didn't work i don't why ! integer iDoorLink ; default { touch_start(integer total_number) { integer i; string strLinkName = llList2String( llGetLinkPrimitiveParams( i,[PRIM_DESC] ),0); while ( i < llGetNumberOfPrims() ) { ++i; if ( llGetLinkName(i) == "New") // or whatever ... { llSetLinkPrimitiveParamsFast(iDoorLink, [ PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 0.0]); iDoorLink = i; } } } }
×
×
  • Create New...