Jump to content

OxalysResourceConsortium

Members
  • Posts

    45
  • Joined

  • Last visited

Reputation

0 Neutral

Profile Information

  • About me
    Rocketeer

Recent Profile Visitors

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

  1. I'm going to have to read this post at least 20 times before I understand what parts about it are what I don't understand. Thanks anyways, I'll get back to you when I know what it is I want to ask.
  2. been searching trough this 285 page thread to see if I could find a straight answer to this but I couldn't so I figured I'd just ask. How is kOS integration coming along?
  3. Is there a way to run the following part of a script I'm working on UNTIL ALTITUDE > AltRng{ //Diagnostic PRINT statements begin SET DelTlv TO "at rest.". PRINT DelTlv AT (16,1). PRINT AltRng AT (0,0). PRINT TrmVel AT (14,0). //End of diagnostic PRINT statements IF VERTICALSPEED > TrmVel AND Tlv > 0 { UNTIL VERTICALSPEED = TrmVel OR VERTICALSPEED < TrmVel { SET Tlv TO Tlv-0.01. WAIT 0.2. //Diagnostic PRINT statements begin SET DelTlv TO "decreasing.". PRINT DelTlv AT (16,1). PRINT Tlv AT (5,2). //End of diagnostic PRINT statements }. }. IF VERTICALSPEED < TrmVel AND Tlv < 1 { UNTIL VERTICALSPEED = TrmVel OR VERTICALSPEED > TrmVel-5 { SET Tlv TO Tlv+0.01. WAIT 0.2. //Diagnostic PRINT statements begin SET DelTlv TO "increasing.". PRINT DelTlv AT (16,1). PRINT Tlv AT (5,2). //End of diagnostic PRINT statements }. }. }. multiple times with different values for the AltRng, TrmVel and Tlv variables each time without having to repeat the code multiple times in the same script. I've tried running it as a separate program called TrmVel-Tlv-Control-Uns (Uns = unstripped code) and then declare the three variables as parameters like so... DECLARE PARAMATER AltRng, TrmVel, Tlv. UNTIL ALTITUDE > AltRng { //Diagnostic PRINT statements begin SET DelTlv TO "at rest.". PRINT DelTlv AT (16,1). PRINT AltRng AT (0,0). PRINT TrmVel AT (14,0). .......(code continues) that way each time I need to run that code instead of copypasting it onto my script which would make it inelegant and really long (take up way too much space) I could just insert this code into the main script. SET AltRng TO [new value]. SET TrmVel TO [new value]. RUN TrmVel-Tlv-Control-Uns(AltRng, TrmVel, Tlv). Unfortunately this doesn't seem to work and it just seems to skip to the end of my main script (made visible by the quickly flashing diagnostic PRINT statements. The last part of my code locks the throttle (Tlv) to 100% and has a PRINT statement so that I know it has reached near the end of my main script //temporary code placeholder. CLEARSCREEN. PRINT "Throttling up to 100%". LOCK Tlv TO 1. //end placeholder //This is just to keep the program running for //testing purposes. WAIT UNTIL SHIP:LIQUIDFUEL = 0 AND SHIP:OXIDIZER = 0. Again I appreciate everyone's massive amount of patience for a complete noob:P. All the help and support is appreciated. I've got a long way to hopefully I'll get my commsat network up sometime this month.
  4. FPC compiler? So what did you have to do? Use a new compiler? EDIT: Just tested it, works fine so far. Thanks for the quick fix, appreciate the hard work. Keep it up.
  5. Don't know if this has been suggested before, but I did a quick search and couldn't find anything, so I thought I would nominate pizzaoverhead's Atmospheric Sound Enhancement mod to the RO modlist.
  6. The KSP folder is on my Desktop as /home/*USERNAME*/Desktop/KSP/KSP_0.23/KSP_0 .23_linux (4 kOS debug)/Plugins/PluginData/Archive Yes, I quadruple checked every folder and subfolder in both the KSP and Saturn directory and they are both set to the most permissive read and write settings. Problem is, even when I try to go to the settings menu on Saturn I get this little message.
  7. Everytime I try to open a file from my Archive I get a message saying "Access Violation."
  8. Thanks a Kerb-load bro, I was just about to start reading the documentation in notepad++ on how to define a language. Got as far as the comments which are easy enough.
  9. THIS!! I've been looking everywhere for this or at least instructions on how to make one myself as it would save a lot of time and make things easier. There already exists a kOS IDE but that's only for Windows. And by creating this we wouldn't need to have and entire dev effort to create a text editor just for this one language when there already exists a perfectly well-functioning OPEN-SOURCE platform we can use and easily keep up-to-date with the latest version of kOS. I would do it myself but I'm nowhere near familiar enough with KerboScript to take on this project. The user-defined language file could even be included with the download for the mod.
  10. The reason I put the WAITs inside the IFs is that without them, during testing (before I put the part that would throttle the craft up if it was going to slow) the throttle would be decreased too fast and the craft would slow down way too much. This way the throttle would be taken down a notch and then the script would wait a half second (originally tested it with 'WAIT 0.5.', but it was too slow so I changed it to 'WAIT 0.2.', and it worked pretty well) to let the vertical velocity change before checking it again and throttling down if necessary. Given your suggestions though it would probably be a better idea to nest the UNTIL's inside the IF's like so... IF VERTICALSPEED > 125 AND Tlvl > 0 { UNTIL VERTICALSPEED <= 125 { SET Tlvl TO Tlvl-0.02. WAIT 0.2. }. }. I'm not sure if the equals to or less than operator is recognized in KerboScript so if it isn't then I guess UNTIL VERTICALSPEED <= 125 would have to be replaced with UNTIL VERTICALSPEED = 125 OR VERTICALSPEED < 125
  11. Having trouble with this little bit of code meant to control throttle on the stock Kerbal X to keep it from going faster than terminal velocity. //1000-2800m Terminal vel. of 125 m/s PRINT "2800m ascent/125 m/s MAX.". UNTIL ALTITUDE > 2800 { IF VERTICALSPEED < 124 { SET Tlvl TO Tlvl+0.02. WAIT 0.2. }. IF VERTICALSPEED > 125 { SET Tlvl TO Tlvl-0.01. WAIT 0.2. }. }. print "next.". The vertical speed goes well beyond 130 m/s and the throttle doesn't respond at all. When I comment out the first part that is meant to keep the craft from going too slow by slowly throttling up the craft the second part that throttles down the craft works just fine. Here is what that code looks like. //1000-2800m Terminal vel. of 125 m/s PRINT "2800m ascent/125 m/s MAX.". UNTIL ALTITUDE > 2800 { // IF VERTICALSPEED < 124 // { // SET Tlvl TO Tlvl+0.02. // WAIT 0.2. // }. IF VERTICALSPEED > 125 { SET Tlvl TO Tlvl-0.01. WAIT 0.2. }. }. print "next.". So what am I not getting here. Here's the entire code
  12. Thanks, I probably won't need to keep that loop in there since I was just writing the code one piece at a time and testing it as I went. In the final version it should work without the loop then?
×
×
  • Create New...