Altier Verwood Posted September 15, 2021 Share Posted September 15, 2021 (edited) So this is a doozy but I will try to explain it. I am working with a flight script I am trying to re write, there is a lot of junk in here that isn't important but bare with me please. the controls are as follows OUT OF MOUSE LOOK (this part is important.) W (brings the nose of the ship down) S (brings the nose of the ship up) A (rolls the ship left) D (rolls the ship right) E (throttle up) C (throttle down) Shift-A (rotates the ship left) Shift-D(rotates the ship right) But in mouse look, the controls are changed. these commands do the same thing and i can no longer roll the ship when in mouse look. |A (rotates the ship left) D (rotates the ship right) Shift-A (rotates the ship left) Shift-D(rotates the ship right) I have looked through this script many times, removed anything that talked about mouse look, but nothing worked to fix my problem, here is the full script below. any help on this would be vary appreciate,d I just want the controls to be the same in and out of mouse look. Edited September 15, 2021 by Altier Verwood Link to comment Share on other sites More sharing options...
Quistess Alpha Posted September 15, 2021 Share Posted September 15, 2021 there's not much you can do about it. SL only reports one kind of left-right while in mouse look and not the other. 1 Link to comment Share on other sites More sharing options...
Altier Verwood Posted September 15, 2021 Author Share Posted September 15, 2021 OHHHHHH so what you are saying is even if I tell it to use shift A or D it just won't work in mouse look it will only take one command? Link to comment Share on other sites More sharing options...
Quistess Alpha Posted September 15, 2021 Share Posted September 15, 2021 4 minutes ago, Altier Verwood said: OHHHHHH so what you are saying is even if I tell it to use shift A or D it just won't work in mouse look it will only take one command? yes. 1 Link to comment Share on other sites More sharing options...
Altier Verwood Posted September 15, 2021 Author Share Posted September 15, 2021 Dang it I will go cry in a corner now. Link to comment Share on other sites More sharing options...
Mollymews Posted September 16, 2021 Share Posted September 16, 2021 (edited) On 9/15/2021 at 2:56 PM, Altier Verwood said: But in mouse look a way is to use control combinations so that the vehicle controls work the same in both views. A pcode example control(integer level, integer edge) { // we use C and E as control keys // which gives us 12 control inputs in both standard and mouselook views // W,A,S,D // C + W,A,S,D // E + W,A,S,D integer wasd; if (level & 1) wasd = 1; // W else if (level & 2) wasd = 2; // S else if (level & 4 || level & 256) wasd = 4; // A else if (level & 8 || level & 512) wasd = 8; // D integer ctrl = 0; if (level & 16) ctrl = 1; // C else if (level & 32) ctrl = 2; // E if (ctrl == 0) { if (wasd == 1) W (brings the nose of the ship down) if (wasd == 2) S (brings the nose of the ship up) if (wasd == 4) A (rolls the ship left) if (wasd == 8) D (rolls the ship right) } else if (ctrl == 1) C { if (wasd == 1) C + W (throttle up) if (wasd == 2) C + S (throttle down) if (wasd == 4) C + A (rotates the ship left) if (wasd == 8) C + D (rotates the ship right) } else if (ctrl == 2) E { // these can used in conjunction with edge (key up) for one time things like if (wasd == 1 && edge == wasd) E + W (toggle landing lights on/off) if (wasd == 2 && edge == wasd) E + S (emergency stop. set the vehicle to non-physical) if (wasd == 4 && edge == wasd) E + A (toggle cabin lights off/off) if (wasd == 8 && edge == wasd) E + D (bring up a dialog menu. llDialog(...)) } ...other stuff ... } Edited September 16, 2021 by Mollymews but 1 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