Wuwuk Posted March 27, 2015 Share Posted March 27, 2015 @WuwukOk so you are staging in the same physics tick as you lock the throttle to 0. If you add a "wait 0.1." between lock throttle to 0 and stage then it will work. The reason you cant shut it down is because it is no longer part of the ship.Thanks. Link to comment Share on other sites More sharing options...
Dr_Goddard Posted March 28, 2015 Share Posted March 28, 2015 Dunbaratu:Can you assist to demo how to make a 3D array?I want to extend this array to add a dimension for mod lists for each tagged part.Is there a better way to state the size of the array than adding lists one at a time?SET TAGS TO LIST(). // Empty list.TAGS:ADD( LIST() ).//0TAGS:ADD( LIST() ).//1TAGS:ADD( LIST() ).//2TAGS:ADD( LIST() ).//3TAGS:ADD( LIST() ).//4TAGS:ADD( LIST() ).//5TAGS[0]:ADD( "FR ROTATRON" ).//0,0 front right leg hip, and 1,2,3 kneesTAGS[0]:ADD( "FR FOLDATRON1" ).//0,1TAGS[0]:ADD( "FR FOLDATRON2" ).//0,2TAGS[0]:ADD( "FR FOLDATRON3" ).//0,3TAGS[1]:ADD( "FL ROTATRON" ).//1,0 front left leg hip, and 1,2,3 kneesTAGS[1]:ADD( "FL FOLDATRON1" ).//1,1TAGS[1]:ADD( "FL FOLDATRON2" ).//1,2TAGS[1]:ADD( "FL FOLDATRON3" ).//1,3TAGS[2]:ADD( "MR ROTATRON" ).//2,0 mid right leg hip, and 1,2,3 kneesTAGS[2]:ADD( "MR FOLDATRON1" ).//2,1 TAGS[2]:ADD( "MR FOLDATRON2" ).//2,2TAGS[2]:ADD( "MR FOLDATRON3" ).//2,3TAGS[3]:ADD( "ML ROTATRON" ).//3,0 mid left leg hip, and 1,2,3 kneesTAGS[3]:ADD( "ML FOLDATRON1" ).//3,1TAGS[3]:ADD( "ML FOLDATRON2" ).//3,2TAGS[3]:ADD( "ML FOLDATRON3" ).//3,3TAGS[4]:ADD( "RR ROTATRON" ).//4,0 rear right leg hip, and 1,2,3 kneesTAGS[4]:ADD( "RR FOLDATRON1" ).//4,1TAGS[4]:ADD( "RR FOLDATRON2" ).//4,2TAGS[4]:ADD( "RR FOLDATRON3" ).//4,3TAGS[5]:ADD( "RL ROTATRON" ).//5,0 rear left leg hip, and 1,2,3 kneesTAGS[5]:ADD( "RL FOLDATRON1" ).//5,1TAGS[5]:ADD( "RL FOLDATRON2" ).//5,2TAGS[5]:ADD( "RL FOLDATRON3" ).//5,3//thirdsegs are required at most times to be perpendicular to the terrain.//firstsegs and secondsegs are at most times required to mirror each other.//when walking, only first segment raises, second segment stays put, or is//proportional.//walking requires two set of tripods in mirrored motion.//other walk profiles are quite elegant to watch and should be programmed.//"wave" and "ripple" gaits are possible. But tripod is fastest. Link to comment Share on other sites More sharing options...
Dunbaratu Posted March 28, 2015 Share Posted March 28, 2015 Dunbaratu:Can you assist to demo how to make a 3D array?I want to extend this array to add a dimension for mod lists for each tagged part.Is there a better way to state the size of the array than adding lists one at a time?At the moment there is not. Two things I'd like to see are:1 - A way to say "Return me a list of N things that are all copies of blarg": i.e. SET fiveAs TO LIST(5,"A"). // 5 things, each one is "A".2 - A way to say "Make me a list of the things in this tuple": i.e. SET fiveAs TO { "A", "A", "A", "A", "A" }.None of these exist yet, but they probably could with some work. Link to comment Share on other sites More sharing options...
Guest Darth Gerbil Posted March 30, 2015 Share Posted March 30, 2015 My only criticism is that you can't paste code into the kos window. Link to comment Share on other sites More sharing options...
Dunbaratu Posted March 30, 2015 Share Posted March 30, 2015 My only criticism is that you can't paste code into the kos window.You can paste it into the editor sub-window, though.I have no idea how you would go about reading the cut buffer from inside Unity, but Unity's own text editing widget knows how. Link to comment Share on other sites More sharing options...
Kamik423 Posted March 31, 2015 Share Posted March 31, 2015 Hi, I tried to write an efficient orbit program, but the rocket doesn't do pitch. It locks at straight up. (Code: http://pastebin.com/DeR0eJKP) The demoprogram also doesn't work. Can anybody help me?sorry, I am very new to kOS. Link to comment Share on other sites More sharing options...
avi Posted March 31, 2015 Share Posted March 31, 2015 This would be one of my favorite mods, except that LOCK STEERING doesn't work at all. It doesn't utilize engine gimbaling (the primary means of steering on launch in Realism Overhaul), and even when it doesn't require that, trying to lock onto a heading causes even very simple rockets to wobble all over the nav ball, kind of centering around the heading. Until LOCK STEERING works, the mod is kind of unusuable. Link to comment Share on other sites More sharing options...
Joe32320 Posted March 31, 2015 Share Posted March 31, 2015 This would be one of my favorite mods, except that LOCK STEERING doesn't work at all. It doesn't utilize engine gimbaling (the primary means of steering on launch in Realism Overhaul), and even when it doesn't require that, trying to lock onto a heading causes even very simple rockets to wobble all over the nav ball, kind of centering around the heading. Until LOCK STEERING works, the mod is kind of unusuable.Does RO change the way engine gimballing work from stock, cause kOS will utilise the engine gimbals in stock as long as they unlocked, and it is possible to make steering code yourself to lock to a heading should you find lock steering unhelpful for the rockets you're launching. Link to comment Share on other sites More sharing options...
celem Posted March 31, 2015 Share Posted March 31, 2015 (edited) @AviI was having this exact issue today. My FAR launcher wobbled like a demon, turned out the gimbal was actually at fault.LOCK STEERING does use the engine gimbal, the wobbling all over the navball you are seeing is probably actually a result of the gimbal trying to hold its course. I locked my mainstage gimbal in the VAB, which forces kOS to use the control surfaces and you get smooth flight. Once in vacuum i prefer torque/rcs for attitude control anyway, big thrusty engines tend to produce this wobbling as they hunt for the lock point. As a player without kOS you would be hitting 'CAPS' at this point, but I cant find anyway to invoke that. This I see most on wobbly rockets, check your torque distribution, could be that kind of 'circling'. (the middle of the rocket aims true, the nose and tail describe opposite circles. Less common with KerbalJointReinforcement)edit: Also, how new are you to RO? I hope you are aware that many engines do not have a gimbal with that setup. If you have RP-0 especially then you have a good number of gimbal-less early engines. A second possibility is that you have toggled SAS, which kills kOS ability to control entirely and that what you are seeing is actually SAS hunting the hold point not kOS.@Kamik You lock the steering outside the until apoapsis loop. You need to move that line down into the loop body so that it is constantly re-called for it to follow your curve. The fix should literally be as simple as placing that steering lock directly below the until, before your massive tree of IFs... Which hurt my eyes buddy, but I see what you are doing. I prefer nesting WHEN triggers for less strain on the processor. The way you have it then at the top of the climb every loop is checking all of the IF blocks and passing through them then setting the current angle wanted again and again. Instead use something like WHEN ALTITUDE > 500 THEN {SET TV TO 105. SET PT TO 85. WHEN ALTITUDE > 1000 THEN {SET TV TO 110. SET PT TO 80. WHEN......}}. You can extend this as far as possible, only the next sequential trigger exists at any moment since it is set up by the last one and each trigger fires once and once only to set the current values and queue its successor. This is perfect for ascent/descent and timewarp management. Just make sure these are out of the loop, my turnshape and throttle settings for launch are the first thing I call with a tree of WHEN triggers like this.)Basically, its back to front, you constantly set the angle you want but only lock steering once. You want to constantly lock steering and only set the angles once. Constantly setting both works but is needlessly heavy code, you really want to keep the amount of logic (if) going on inside the loops to a minimum. (it will always happen, just be as smart as possible about it and think carefully about how each loop iteration will go, trace the code)My turn!Speaking of WHEN triggers. Whats their scope? I want to declare a trigger in this fashion in 1 script and then have the script end, be deleted and another program run. Do all the WHENs it sets up expire with it or are they still active?Secondly. Timewarp. KSP has some sketchy bugs itself with regards to going back and forth between modes. But what i really want to know is: Is there any way to produce 'physics-warp', that is 1-4x produced via alt-period, in kOS? I can achieve it while in atmosphere by just calling for warp, but is there any way to force that mode in vacuum? (I want to burn under warp, something i regularly do with nukes/ions manually) Edited March 31, 2015 by celem Link to comment Share on other sites More sharing options...
avi Posted March 31, 2015 Share Posted March 31, 2015 Does RO change the way engine gimballing work from stock, cause kOS will utilise the engine gimbals in stock as long as they unlocked, and it is possible to make steering code yourself to lock to a heading should you find lock steering unhelpful for the rockets you're launching.It doesn't use gimbaling in RO or not in RO. I tested with two separate installations, both with the stock universe and with Realism Overhaul, and LOCK STEERING is totally broken. I tried it with and without engine gimballing enabled as well, and tried to use it both when engines were and were not firing. I get the same results no matter what. While it would be possible to use Raw Controls to lock to a heading, that's a million times more cumbersome; LOCK STEERING is basic functionality and if it doesn't work, it's a gamebreaker. I really look forward to when this issue is fixed. Link to comment Share on other sites More sharing options...
Dunbaratu Posted March 31, 2015 Share Posted March 31, 2015 It doesn't use gimbaling in RO or not in RO.This is false. When I play stock and lock steering I see the engine exhaust is being aimed back and forth as it steers all the time. Link to comment Share on other sites More sharing options...
avi Posted March 31, 2015 Share Posted March 31, 2015 (edited) This is false. When I play stock and lock steering I see the engine exhaust is being aimed back and forth as it steers all the time.Yeah, it affects engine gimballing, it just doesn't use it to turn. The engines sort of vibrate in place; their movement has no bearing on where you tell it to lock steering. It's not just the gimbaling that's the issue, to clarify: when I try to orient just with reaction wheels in space, the craft spins around in a way that's sort of roughly centered on where I tell it to LOCK STEERING, but it never actually points at the heading direction. There are no circumstances in which LOCK STEERING successfully points the rocket in the direction you tell it to.EDIT: I think I may have figured out the issue, at least partially. I think it's a MechJeb interaction; the problem is alleviated when I detach MechJeb. Edited March 31, 2015 by avi Link to comment Share on other sites More sharing options...
Kamik423 Posted March 31, 2015 Share Posted March 31, 2015 THANKS FOR THE FIX!!!!Next problem: I really love remotetech, and I hoped to use this mod with it... howerer remotetech cuts the throttle when I get out of communications range. even if kOS is controlling the rocket. Workaround?Thank you! Link to comment Share on other sites More sharing options...
JD_Tiger Posted March 31, 2015 Share Posted March 31, 2015 Hey guys,since kOS works now for me, I try to establish a remoteTech network around Kerbin.But to make my script work entirely like I want it to work, i need the partmodule:doaction phrase... but from the documentary i can't really find the completely right exclamation for it.Would be nice if someone could give me an example for this phrase.Greets JD_Tiger Link to comment Share on other sites More sharing options...
Ziw Posted March 31, 2015 Share Posted March 31, 2015 Hey guys,since kOS works now for me, I try to establish a remoteTech network around Kerbin.But to make my script work entirely like I want it to work, i need the partmodule:doaction phrase... but from the documentary i can't really find the completely right exclamation for it.Would be nice if someone could give me an example for this phrase.Greets JD_TigerLike this?print "Activating mothership antenna".set antenna to ship:partstagged("MSOmni")[0]:getmodule("ModuleRTAntenna").antenna:doevent("activate").This page may help youhttp://ksp-kos.github.io/KOS_DOC/commands/parts.html Link to comment Share on other sites More sharing options...
JD_Tiger Posted March 31, 2015 Share Posted March 31, 2015 (edited) ok...Try it...Page still doeesn't ring something in me PS: Where do I get the Tag from? Edited March 31, 2015 by JD_Tiger Link to comment Share on other sites More sharing options...
Ziw Posted March 31, 2015 Share Posted March 31, 2015 ok...Try it...Page still doeesn't ring something in me PS: Where do I get the Tag from?Right-click a part in question and change it's tag. Link to comment Share on other sites More sharing options...
JD_Tiger Posted March 31, 2015 Share Posted March 31, 2015 (edited) *Facepalm*Thanks...Try my script then will edit thisget following error:Get suffix'DOEVENT' not found on objet LIST of 3 itemsAny idea what I can do? Edited March 31, 2015 by JD_Tiger Link to comment Share on other sites More sharing options...
Ziw Posted March 31, 2015 Share Posted March 31, 2015 THANKS FOR THE FIX!!!!Next problem: I really love remotetech, and I hoped to use this mod with it... howerer remotetech cuts the throttle when I get out of communications range. even if kOS is controlling the rocket. Workaround?Thank you!Please enable RT button/light on KOS Panel (like here Link to comment Share on other sites More sharing options...
JD_Tiger Posted March 31, 2015 Share Posted March 31, 2015 Tryed my script got following error:Get suffix'DOEVENT' not found on objet LIST of 3 itemsAny idea what I can do?Script: https://drive.google.com/file/d/0BypxFvfIp362RDNFU2JoWUtJWHM/view?usp=sharing Link to comment Share on other sites More sharing options...
Kamik423 Posted March 31, 2015 Share Posted March 31, 2015 Please enable RT button/light on KOS PaneIs this documented anywhere, I couldn't find it?Thanks Link to comment Share on other sites More sharing options...
ManTrelk Posted March 31, 2015 Share Posted March 31, 2015 I'm having the same problem as Evi - LOCK STEERING causes the craft to oscillate around the target orientation. I don't have mechjeb installed, though. Link to comment Share on other sites More sharing options...
JD_Tiger Posted March 31, 2015 Share Posted March 31, 2015 too little control authority?Add MOAR SAS... Link to comment Share on other sites More sharing options...
Ziw Posted March 31, 2015 Share Posted March 31, 2015 I'm having the same problem as Evi - LOCK STEERING causes the craft to oscillate around the target orientation. I don't have mechjeb installed, though.First check that the root part of your vessel is aligned with vessel's general axis and ideally is the part you are controlling from. Link to comment Share on other sites More sharing options...
Sonny_Jim Posted April 1, 2015 Share Posted April 1, 2015 Can anyone recommend a way to do the following:If any liquid fuel tank is empty, stage. Link to comment Share on other sites More sharing options...
Recommended Posts