Poltergeist Azarov
Resident-
Posts
94 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Everything posted by Poltergeist Azarov
-
Problem with vehicle camera
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
When I leave mouselook, camera gets too far away sometimes so vehicle needs a scripted camera resetter. The scenario I wasnt tend to use is checking avatar if he is in mouselook. Needed some event which triggers when avatar leaves mouselook or some smiliar easier scenarios. Well, I am just gonna use the one you are talking about. ty -
Hello, when I left mouselook mode during driving the vehicle, camera losts its normal following position then after a while, it resets itself and gets back to the normal position. Now I am thinkin of to reset its position after each leaving of mouse look mode. However I dont really like this scenario, any suggestions?
-
Media does not play automatically at all
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
Thanks both. -
I made a media window which turns on by below code but it only shows a white screen so does not open the media site automatically unless I click on screen once. Any ideas? if (MediaON==FALSE) { MoveMediaWindow("up"); string URL = "http://www.youtube.com"; integer face=2; llWhisper(0,"Media switched on.."); llClearLinkMedia(MediaLink,face); llSetLinkPrimitiveParamsFast(MediaLink,[PRIM_TEXTURE, face, TEXTURE_MEDIA, <2.32100, 3.11000, 0>, <0.62300,-0.02008,0> , 0.0, PRIM_FULLBRIGHT, face, TRUE, PRIM_GLOW, face, 0.0, PRIM_COLOR, face, <1.0, 1.0, 1.0>, 1.0]); llClearLinkMedia(MediaLink,face); llSetLinkMedia(MediaLink,face, [ PRIM_MEDIA_CURRENT_URL, URL, PRIM_MEDIA_HOME_URL, URL, PRIM_MEDIA_AUTO_PLAY, TRUE, PRIM_MEDIA_AUTO_SCALE, TRUE, PRIM_MEDIA_PERMS_CONTROL, PRIM_MEDIA_PERM_ANYONE, PRIM_MEDIA_PERMS_INTERACT, PRIM_MEDIA_PERM_ANYONE]); MediaON=TRUE; return; }
-
Problem with llRequestPermissions()
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
Theres no link change and script1 confuses after some permission change happens between passengers and driver on script2. This seemed to be a bug to me before aswell. I would like to paste whole script on here but I am sure you would have hard time to read it. -
Hello, When I give some permissions to sitters on my vehicle by script2, this causes to lose permissions taken by script1. So when some sitter changes her/his position, I lose my camera control and so on.
-
Problem with control() event
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
As I realized today, when I take controls for vehicle driver in script1, and change few permissions between few sitters and drivers in script2, this causes to lose permissions in script1 for driver. then driver seems to be only able to control vehicle in mouselook mode. so control() event does not trigger in normal view mode when this happens. :\ -
Problem with control() event
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
Thank you for making me aware of that . Its possible to keep control() event yo trigger though, that was the thing which confuses me and made me thought there was a bug. -
Problem with control() event
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
Problem occurs when i request animation permission from another sitter on the vehicle. And not always... After few animation permission requests, control() stops triggering any of controls in normal view mode. This seems to be a bug to me. Which forces me to refresh control permission each time i request animation permission which causes different problems. -
As I realized today, sometimes my script loses controls taken by llTakeControls() in normal view mode. When this happens, control() event only triggers in mouselook mode. Any ideas? Thanks...
-
How to calculate vehicle speed in MPH?
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
I appreciated and will keep these in mind. Thanks again -
This works great Thanks alot. I hope I can find a way to make it simpler more than below code. Since it costs alot this way just for a simple operation. rotation PRIM2ROT;vector PRIM2POS;rotation PRIM3ROT;vector PRIM3POS;rotation PRIM4ROT;vector PRIM4POS;rotation PRIM3RELROT;vector PRIM3RELPOS;rotation PRIM4RELROT;vector PRIM4RELPOS;list Relatives;default{ state_entry() { PRIM2ROT=llList2Rot(llGetLinkPrimitiveParams(2,[PRIM_ROT_LOCAL]),0); PRIM2POS=llList2Vector(llGetLinkPrimitiveParams(2,[PRIM_POS_LOCAL]),0); PRIM3ROT=llList2Rot(llGetLinkPrimitiveParams(3,[PRIM_ROT_LOCAL]),0); PRIM3POS=llList2Vector(llGetLinkPrimitiveParams(3,[PRIM_POS_LOCAL]),0); PRIM4ROT=llList2Rot(llGetLinkPrimitiveParams(4,[PRIM_ROT_LOCAL]),0); PRIM4POS=llList2Vector(llGetLinkPrimitiveParams(4,[PRIM_POS_LOCAL]),0); PRIM3RELROT=PRIM3ROT / PRIM2ROT; PRIM3RELPOS=(PRIM3POS - PRIM2POS) / PRIM2ROT; PRIM4RELROT=PRIM4ROT / PRIM2ROT; PRIM4RELPOS=(PRIM4POS - PRIM2POS) / PRIM2ROT; } touch_start(integer total_number) { PRIM2ROT=llList2Rot (llGetLinkPrimitiveParams(2,[PRIM_ROT_LOCAL]),0); PRIM2POS=llList2Vector(llGetLinkPrimitiveParams(2,[PRIM_POS_LOCAL]),0); PRIM3ROT = PRIM3RELROT * PRIM2ROT; PRIM3POS = PRIM2POS + PRIM3RELPOS * PRIM2ROT; PRIM4ROT = PRIM4RELROT * PRIM2ROT; PRIM4POS = PRIM2POS + PRIM4RELPOS * PRIM2ROT; llSetLinkPrimitiveParamsFast(3,[PRIM_POS_LOCAL,PRIM3POS, PRIM_ROT_LOCAL,PRIM3ROT, PRIM_LINK_TARGET,4, PRIM_POS_LOCAL,PRIM4POS, PRIM_ROT_LOCAL,PRIM4ROT]); }}
-
How to calculate vehicle speed in MPH?
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
Thanks I was wondering if I was following the right way. Since mathematics are complicated to me. -
How to calculate vehicle speed in MPH?
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
I wrote that one earlier even if I am not sure yet. So far, as I realized, only way to get object speed is llVecMag(llGetVel()) as float in Meters Per Second. And 1 m/s is equal to 2.2369mph. (source) Finally my solution is to calculate object speed as MPH: float ms=llVecMag(llGetVel()); llOwnerSay((string)(2.2369*mps)); Anything wrong? -
rotation PRIM2ROT=llList2Rot(llGetLinkPrimitiveParams(2,[PRIM_ROT_LOCAL]),0); vector PRIM2POS=llList2Vector(llGetLinkPrimitiveParams(2,[PRIM_POS_LOCAL]),0); rotation PRIM3ROT=llList2Rot(llGetLinkPrimitiveParams(3,[PRIM_ROT_LOCAL]),0); vector PRIM3POS=llList2Vector(llGetLinkPrimitiveParams(3,[PRIM_POS_LOCAL]),0); rotation relativeRot = PRIM3ROT / PRIM2ROT; vector relativePos = (PRIM3POS - PRIM2POS) / PRIM2ROT; llSetLinkPrimitiveParamsFast(3,[PRIM_POS_LOCAL,relativePos, PRIM_ROT_LOCAL,relativeRot]); For example, this does not do the expected behaviour.
-
Been trying understand that lately, any ideas? Thanks...
-
Thanks, I am gonna take a look at that. How to calculate also relative pos? (by keeping the original distance between these two prims) I actually made something but it doesnt keep the original distance between two prims. Just moves 3. prim 3 meters away and faces it on a flat line: touch_start(integer total_number) { rotation MiddleRot=llList2Rot(llGetLinkPrimitiveParams(2,[PRIM_ROTATION]),0); vector MiddlePos=llList2Vector(llGetLinkPrimitiveParams(2,[PRIM_POS_LOCAL]),0); llSetLinkPrimitiveParamsFast(3,[PRIM_POS_LOCAL,MiddlePos+ llRot2Up(MiddleRot) * 3, PRIM_ROT_LOCAL,MiddleRot]); } Works by 3 linked prims and considers 2. prim as relative point for 3. prim.
-
Vehicle keeps its flat position on slopes aswell
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
Thanks both, creator of mesh model will fix the issue. -
Vehicle keeps its flat position on slopes aswell
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
Ok, I finally realized problem. The mesh model I have is not working properly with physics engine. What should I do to give its body proper physics that works fine with physics engine? -
Vehicle keeps its flat position on slopes aswell
Poltergeist Azarov replied to Poltergeist Azarov's topic in LSL Scripting
Thanks, I will keep these in mind Hope I can fix it...