Jump to content

Faustnw

Resident
  • Posts

    3
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

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

  1. Hi, I wonder if is it possible to launch properly several sensors (or sensor repeats) in pararel. My script detects and display the number of prims in a specific area. Preciesly, it will detect the number of prims which are between xx and xx m. The script will also detect and display all xx seconds The number of prims doesn't create me difficulties. I just need to make a substract. The only problem is how to launch not an only range values, but multiples range values at the same time (a list of range values) I tried : -llSensor loop, llSleep and reset the script (and the variables) : Randomly works. It display nothing like it display the second first range values and his numbers of prim but not the others -Use a llSensorRepeat, create a second state, enter in this state and comeback to default state : Display the next range value and the number of prims in here Here is the script of the first solution. In this script, I choose to detect the number of prims which are under 5m, between 5 and 10m and between 10 and 50m : list areas = [5,10,50]; list primList = []; integer previousPrimsNumber = 0; integer primsNb =0; integer firstIndex = TRUE; integer areaID=0; default { state_entry(){ state countPrims; } } state countPrims { state_entry() { integer i; for(i=0;i<llGetListLength(areas);i++){ llSensor( "","", PASSIVE, llList2Integer(areas,i), PI); } } sensor (integer numberDetected) { if(firstIndex){ previousPrimsNumber = numberDetected; primsNb = numberDetected; firstIndex=FALSE; }else{ primsNb = numberDetected-previousPrimsNumber; previousPrimsNumber += primsNb; } primList = llListInsertList(primList, [primsNb], llGetListLength(primList)); areaID++; if(areaID == llGetListLength(areas)){ state displayState; } } no_sensor() { llOwnerSay("Nothing here"); state displayState; } } state displayState { state_entry() { integer j; for(j=0;j<llGetListLength(zones);j++){ llOwnerSay("On "+(string)llList2Integer(areas,j)+" m: "+(string)llList2Integer(primList,j)); } state waitState; } } state waitState { state_entry() { llOwnerSay("Wait..."); primList = []; previousPrimsNumber = 0; primsNb =0; areaID=0; llSleep(5.0); llOwnerSay("Reset"); state primsNbtate; } } I am open to any suggestions. Have a nice day !
  2. Hi, I have basic LSL skills even if I still have many things to learn. I'm making the first steps into HUDs. After some experimentations, I wonder whether is it possible to "touch" a prim with a HUD and not an avatar ? I searched on the Internet but I haven't any informations about this. Thank you
  3. Hi !I post here to introduce myself rather than make friends. But, if you want to spend time with me, why not. I'm started again SL. I spend time in SL scripting, building and sometimes walking. IRL, I almost have the stereotypical portrait of a geek (video-games, mangas, programming). But besides that, I love contemporary and digital artsSorry for my bad English. I'm French
×
×
  • Create New...