Jump to content

Carbon Philter

Resident
  • Posts

    212
  • Joined

  • Last visited

Reputation

11 Good

Recent Profile Visitors

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

  1. Anyone out there got a copy of the basic Readme notecard from the no longer supported VICE combat system? I think I've got everything else from the ver 1.2 pack, which I believe was the last release, but I'm trying to understand the unit/weapon abbreviations and features and that is apparently on the missing notecard. Thanks for any info that can be made available. Carbon
  2. The Land Impact figure is different from the Physics limit required for a vehicle. LI will not change - you just need to do as was advised and change enough of the 54 prims to No Physics so that the scripts will function.
  3. So the global variable gCapnsName doesn't change even though it's created using the variable captain changes depending on the value reported by llAvatarOnSitTarget? I thought that each iteration of the script which threw up a new value for 'captain' would feed through everything else defined from that value. I guess I haven't quite got the reasoning as to how global variables remain persistent even though they're created from changeable values. I don't quite understand scripting. Anyhow, it works a treat. Now on to the next glitch! Many thanks once again, Rolig. Carbon
  4. I'm not sure if the terminology in the title is correct for my problem. Hopefully, someone can help - I just can't see the solution, though there's bound to be one. As part of my vehicle controls, using the CHANGED LINK event, I have identified the avatar in control which allows me to report using llSay( 0, llKey2Name(captain) + " has taken command") in the vehicle set-up process. I want to make another llSay statement on the same lines that "...... has relinquished command" when the avatar stands up, but I can't see how to make the key of the avatar survive after standing up as the CHANGED LINK event will return captain as 00000000-0000-0000-000000000000 which stops me using the llKey2Name function again. My impersonal solution at present is to simply anonymise the stand-up statement as shown below, but if there's a way to retain the key I'd very much appreciate assistance. Thanks in anticipation. Carbon if (c & CHANGED_LINK) { captain = llAvatarOnSitTarget(); if (checkAccess(captain)) { llSay(0, llKey2Name(captain) + " has command"); sit = TRUE; llRequestPermissions(captain, PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION | PERMISSION_CONTROL_CAMERA | PERMISSION_TRACK_CAMERA); llSay(0,"Ready to sail"); llMessageLinked(LINK_SET, 0, "seated", ""); llSleep(1); llSetStatus(STATUS_PHYSICS,TRUE) } else if(captain == NULL_KEY) { llSay(0, "Captain has relinquished command"); }
  5. /Me looks really sheepish. Many thanks, Rolig - not being totally comfortable with scripting of any sort, I have to admit to getting confused between == and =. Among other things, that is. I thought I'd tried both alternatives but obviously not. I'm actually quite amazed at having got as far as I did before asking for help! C.
  6. I'm hoping someone can help my continuing struggles with scripting. I'm attempting to put together a vehicle controls script which also includes variable user options. The objective is to have the owner of the vehicle able to set the user level - Owner, Group, List, or Anyone, via a "Access" dialog menu using a touch_start event, and then, once the permitted category of user is seated, have a different "Controls" dialog menu come up for them to manage the vehicle and camera controls. With my limited mastery of scripting and LSL, I've muddled through and got to a stage where it looks as though the script will work as intended once I add in all the permissions/control details, but I seem to have hit a problem where the "Access" dialog box gets called up on the owner's screen when it's not the owner that does the touching. I'm hoping that there's something simple I'm missing but I can't see it, and would appreciate a steer in the right direction. No doubt I'll hit lots more problems, part‎icularly trying to incorporate both varying camera and seating/passenger positions, but that's for another day. Apologies if the way I've approached the project doesn't conform to the best of scripting principles, but it works in my head. :) Thanks for any help/advice. Script demonstrating the problem is as follows: list notecardsList; integer listener; integer mainMenuChannel; integer accessChannel; integer captainChannel; integer passengerChannel; integer notecardLine; integer sit; float TIMER_DELAY = 0.1; vector SitBridge = <0.50, 0.0, 0.50>; key query; key captain; string access = "Owner"; string ActiveAnim; string notecardName = "!access"; list accessList; integer randomNumber() { return (integer)(llFrand(99999.0))*-1; } menu(key user,integer channel,string title,list buttons) { llListenRemove(listener); listener = llListen(channel,"","",""); llDialog(user,title,buttons,channel); llSetTimerEvent(25.0); } accessMenu(key id) { accessChannel = randomNumber(); menu(id,accessChannel,"Access Level Menu " + "\n \n \n *Actual Access Level = " + access,["Anyone","Group","Close","Owner","List"]); } captainMenu(key id) { captainChannel = randomNumber(); menu(id,captainChannel,"Ready to Sail",["Engine","Flags","Anims","Camera"]); } //Returns true if find is on src integer isOnList(list src, list find) { return (llListFindList(src,find) > -1); } //The function that checks if the toucher has access to the menu integer checkAccess(key id) { string name = llToLower(llKey2Name(id)); return (id == llGetOwner()) || (llSameGroup(id) && (access == "Group")) || ( (isOnList(accessList,[name]) && (access == "List") ) || (access == "Anyone") ); } default { state_entry() { if (llGetInventoryType(notecardName) == INVENTORY_NOTECARD) { //A notecard named "!access" has been found, lets configure tha acess list llOwnerSay("Configuring, please wait..."); notecardLine = 0; query = llGetNotecardLine(notecardName,notecardLine); } else { state ready; } } dataserver(key requested, string data) { if (requested == query) { if (data != EOF) { if ( (llGetSubString(data,0,0) != "#") && (data != "") ) //Ignore blank lines and lines starting with # (comments) { string name = llToLower(llStringTrim(data,STRING_TRIM)); //Get the lowercase name and remove white space at from beginning and end if there are if (llGetFreeMemory() >= 1024) //Script memory check { accessList = (accessList = []) + accessList + [name]; } else { llOwnerSay(name + " could not be added because the script is running out of memory"); state ready; } } notecardLine++; query = llGetNotecardLine(notecardName,notecardLine); } else { state ready; } } } on_rez(integer n) { if (llGetInventoryType("!config") == INVENTORY_TEXTURE) { llOwnerSay("Configuring, please wait..."); notecardLine = 0; query = llGetNotecardLine(notecardName,notecardLine); } else { state ready; } } } state ready { state_entry() { llOwnerSay("--- Ready ---"); llSitTarget(SitBridge, ZERO_ROTATION); } changed (integer c) { if (c & (CHANGED_INVENTORY | CHANGED_OWNER)) //assume that notecard was edited or owner changed so reload the script { llResetScript(); } if (c & CHANGED_LINK) { captain = llAvatarOnSitTarget(); if (checkAccess(captain)) { llSay(0,"Ready to sail"); } else { llSay(0,"Sorry you don't have permission to sail"); llUnSit(captain); llPushObject(captain, <0,0,50>, ZERO_VECTOR, FALSE); } } } touch_start(integer total_number) { key toucher = llDetectedKey(0); if (toucher = captain) { captainMenu(toucher); } else if (toucher = llGetOwner()) { accessMenu(toucher); } else { llSay(0,"Sorry you don't have access to the access control menu, current access level: " + access); } } listen(integer channel, string name, key id, string message) { if (channel == accessChannel) { if (message == "Close") { llOwnerSay("Access set"); return; } access = message; llOwnerSay("Access Mode: " + message); accessMenu(id); } else if(message =="Engine") { llSay(0,"Engine command heard - do stuff"); } else if(message =="Flags") { llSay(0,"Flags command heard - do stuff"); } else if(message =="Anims") { llSay(0,"Anims command heard - do stuff"); } else if(message =="Camera") { llSay(0,"Camera command heard - do stuff"); } } timer() { llListenRemove(listener); llSetTimerEvent(0.0); } }
  7. An alternative to swapping RGB channels in a graphics prog would possibly be adjusting rotation of the sculpt object in Blender and making a new sculpt texture. Sculpties from scratch in Blender are way too hard - for me anyway - and if purchasing the current version Primstar/Blender solution is not possible for any reason, it is still possible to obtain the free version of JASS (pre-Primstar) which includes a legacy version of Blender (2.49) which it works with and which, once installed, you could use for simple remedial work such as you are looking to do. You can pick it up inworld at http://maps.secondlife.com/secondlife/Jass/148/185/25 The process would be to import the sculptie image of the chair into Blender 2.49, rotate its axes to whatever is needed to suit the anims - in Object mode; use the Object Clear/Apply menu to do a 'Apply Scale/Rotation to ObData'; rebake the Sculptie texture using 'Bake Sculpt Meshes' in the drop-down Render menu;, and Export that as a new Second Life sculptie LSL. The new image would then be uploaded to SL to create a new sculptie. Getting the correct axes rotation should just be a case of matching the required chair orientation with that of the chair you're lifting the scripts/anims from, but you would be best to try using local textures to generate trial versions to save upload costs. Maybe a roundabout way of doing it but, to me, doable.
  8. Thx for suggestions. I've used them in the past when fixing a specific view. I'll try them but they relate to one-off camera settings rather than the params which allow you to change camera on the fly. According to the wiki - http://wiki.secondlife.com/wiki/LlSetCameraParams - these particular settings do not appear. Hey ho, back to more experimenting!
  9. Hi again, scripting gurus. Is anyone an expert with the Dan Linden FollowCam settings and could help me? I've been trying all sorts of permutations with the variables for a while now and am beginning to think that what I want to achieve can't be done, but I'd be more than happy to be proved wrong. For a vehicle - ship - being driven, I can happily get any number of views tracking movement from behind, ranging from the worm view below to overhead, but I'm trying to get a sideview and also a rearview and haven't yet been able to achieve it, even with the rearview_cam parameters in the script from the Wiki . Having looked at the way the spin cam works I'm coming round to thinking that the only way to get a continuous side/rear facing view would be to replace the 'for' statement with a timer and constantly updating the camera position by using llGetPos() and adding the appropriate local offset and rotation to it. Here's the spin_cam parameters I was thinking of using as a starting point: spin_cam() { llSetCameraParams([ CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive CAMERA_BEHINDNESS_ANGLE, 180.0, // (0 to 180) degrees CAMERA_BEHINDNESS_LAG, 0.5, // (0 to 3) seconds //CAMERA_DISTANCE, 10.0, // ( 0.5 to 10) meters //CAMERA_FOCUS, <0.0,0.0,5.0>, // region relative position CAMERA_FOCUS_LAG, 0.05 , // (0 to 3) seconds CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE) CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters CAMERA_PITCH, 30.0, // (-45 to 80) degrees //CAMERA_POSITION, <0.0,0.0,0.0>, // region relative position CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE) CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters CAMERA_FOCUS_OFFSET, <0.0,0.0,0.0> // <-10,-10,-10> to <10,10,10> meters ]); float i; vector camera_position; for (i=0; i< 2*TWO_PI; i+=.0125) { camera_position = llGetPos() + <0.0, 14.0, 0.0> * llEuler2Rot(<0.0, 0.0, i>); llSetCameraParams([CAMERA_POSITION, camera_position]); } Am I missing something fundamental or are my attempts to achieve these other views doomed to failure and I will have to simply resort to overriding the normal camera view using Ctrl/Alt/LMB? Thanks Carbon
  10. Many thanks, Dora. Got it in one! I was continuing tests and set up another rig but did it the 'old fashioned way' using llMessageLinked and then used that to set the child's local rot. Maybe not the tidiest of script solutions but got that way to work! vector input;integer switch;default{ link_message(integer sender_num, integer num, string msg, key id) { if(msg = "rotate") { switch = !switch; if (switch==TRUE) { input = <0, -PI/2, 0> ;} else if (switch==FALSE) { input = <0, PI/2, 0> ; } llSetLocalRot( llEuler2Rot(input)); }} Guess it's a combination of the rotation function and using the LinkPrimParametersFast function I need to get my head round. Maybe overcomplicating things through ignorance. :matte-motes-dont-cry: Thanks again. Carbon
  11. I'm still trying to master rotations and thought I had it nailed but yet again find I'm missing something, and would appreciate assistance. I want to have a child prim emitting particles in the xy plane relative to a vehicle's root prim which has no variation in its z axis - boat and propeller wake - but need to have the option to rotate the wake emitter to face either directly forward or backwards. Hope that makes sense! I knocked up a test rig and put a toggle script in the child prim to check it out and it almost works. The emitter prim rotates forward/backward as required, whatever the root prim's horizontal direction , but with the script as written the child emitter prim is rotating around it's own z axis as the root prim faces different directions in the xy plane, and that skews the angle emission of the particles, and I need to avoid that. here's the almost working tester: integer switch; vector input; default { touch_start(integer total_number) { switch = !switch; rotation quat = llEuler2Rot(input); if (switch==TRUE) { input = <0, 3*PI/2, 0> ; llOwnerSay("Touched."); } else if (switch==FALSE) { input = <0, PI/2, 0> ; } llSetLinkPrimitiveParamsFast(2, [PRIM_ROT_LOCAL, llGetLocalRot()*quat]); } } It's got to be something straightforward in the relationship between the local rotations of the root and child but so far I can't grasp it. Help!! Thanks Carbon
  12. Hi all. Need some advice on problem being experienced,please. I've constructed a mesh hull and am test texturing it on the Beta grid. On one side the texture is applied correctly and I've used the Bumpiness setting on Brightness to give some additional depth. The other side of the hullaccepts the texture no problem, but when I apply the Bumpiness setting I lose all the colour as following pics show. However, if I use Darkness rather tha Brightness, it displays the colour. Can anyone advise - is this standard behaviour because it's all one mesh even though it's different texture faces? Alternatively, could it be down to my graphics card? - never had any probs in the past and get decent performance despite having one of the dreaded AMD cards. Or could it maybe even be down to being on the beta grid? I know I can just use the basic image on both sides without the bumpiness setting but it just gives that added depth to the texture if I could use it. Any advice welcomed. Thanks Carbon
  13. OK. Many thanks for help, Drongle. There's still a lot of edit options in Blender I haven't used before - that refinement to the delete function being one of them!
×
×
  • Create New...