childhoodbestfriend489 Posted March 24, 2021 Share Posted March 24, 2021 (edited) (14, 71): Error: Function call mismatches type or number of arguments. (14, 71) is 0 How to correct it: llRezObject("Web",llGetPos()+<1,0,0>,llGetCameraPos(),<0,0,0>,0); N.B. Didn't write the whole script here. Edited March 24, 2021 by childhoodbestfriend489 Link to comment Share on other sites More sharing options...
KT Kingsley Posted March 24, 2021 Share Posted March 24, 2021 (edited) The fourth parameter you've entered, <0,0,0>, should be a rotation. What you've put there has three components, so it's seen as a vector. In LSL rotations are quaternions and have four components. But you really don't need to worry about those. Just use the built-in constant ZERO_ROTATION. If you do need to use something other than a zero rotation use llEuler2Rot (vector) if you're comfortable with radians, or llEuler2Rot (vector * DEG_TO_RAD) if you'd prefer to specify the x, y and z rotation components in degrees. Also, the third parameter, for which you've used llGetCameraPos(), is a velocity that's applied to the rezzed object (useful for bullets and other projectiles). If the object you're rezzing is physical the results could be quite spectacular and unpredictable, though if it isn't physical the parameter won't have any effect. Edited March 24, 2021 by KT Kingsley Link to comment Share on other sites More sharing options...
childhoodbestfriend489 Posted March 24, 2021 Author Share Posted March 24, 2021 If Mouse look button pressed then do something, what the LSL will be? Link to comment Share on other sites More sharing options...
KT Kingsley Posted March 24, 2021 Share Posted March 24, 2021 First you need to get PERMISSION_TAKE_CONTROLS using llRequestPermissions. Then when that permission is granted, in the run_time_permissions event you need to use llTakeControls for CONTROL_ML_LBUTTON. Once you've done that the control event will be triggered whenever the left mouse button is pressed or released while you're in mouselook. The level parameter (as it's called in the wiki - you might be more comfortable calling it something like "pressed") has a bit corresponding to the value of CONTROL_ML_LBUTTON set when the mouse button is pressed and cleared when it's released. You test it by using bitwise &: if (level & CONTROL_ML_LBUTTON) // the button is pressed else // the button is not pressed The edge (perhaps more comfortably called "changed") parameter tells you if the state of the button has changed since the last time the control event was triggered. You test it in the same way as the level parameter. So with those two parameters you can figure out if the button has just been pressed, or is still pressed, or has just been released, or is still not pressed. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now