Jump to content

[KSP 1.10.1 and 1.11] kOS v1.31.0 : kOS Scriptable Autopilot System


Recommended Posts

6 hours ago, Emilienj said:

Hello,

Firstly thanks for this beautiful mod. 
i want to know if is it possible to have the same function as the function « at » does for « print » but for the function Hudtext ? If yes how can i do this ?

thanks 

Not automatically, but you could write your own wrapper function that does something like this:

function warn_message {
  parameter text, col, row.
  
  hudtext(text, 5, 2, 20, white, false).
  print text at (col, row).
}

 

Link to post
Share on other sites
18 hours ago, SATNAV1122 said:

Hello,

 

Cool thing but can you send the earlier versions so i can use them with my 1.10.1 mods please?

Your sincearly,

Nikodem K******ki

Go to the github page and see the "releases" link.  It should have older versions there.

 

Link to post
Share on other sites
51 minutes ago, realjuliusPGKC said:

im trying to add scripts from outside the game but it doesnt read it in game anyhelp?

 

What folder are you placing them in and are you switching to the library in-game? 

Link to post
Share on other sites
6 hours ago, JebIsDeadBaby said:

Hi, 

why KERBIN:VELOCITY:ORBIT = V(0,0,0)? If thought it should return orbital velocity of Kerbin around it's parent body, which is the Sun. 

Well, it sort of does... but ... the reference frame SHIP:RAW that all the velocities are returned in is the reference frame the main game uses, which is centered around the active vessel's current Sphere of Influence body.

In other words, if you are currently orbiting Kerbin, then you are getting Kerbin's velocity relative to itself, which is why it's zero.

If you want its velocity relative to the Sun, you can just not care what's the reference frame it's using and just explicitly subtract one velocity vector from the other, like so:

print "Kerbin is orbiting The Sun at " + (kerbin:velocity:orbit - sun:velocity:orbit):mag + "meters per second.".

 

Link to post
Share on other sites

I've been learning Kos for a couple days and have started on a docking autopilot but I cant  get the target:facing:inverse function to work so I made it add 180 degrees to the targets pitch and yaw and then used mod to get the inverse but its like the program stops adding 180 to the angles idk why is this a bug or am I just stupid?

My code looks like this

Until false {

Set pt to ((target:facing:pitch) + 180).

Set yt to ((target:facing:yaw) + 180).

Set pm to mod (pt,360).

Set ym to mod(yt,360).

Lock steering to r (pm,ym,0).

}

 

Edit:

I am infact an idiot your supposed to inverse either the pitch or the yaw not both... Lol I was just doing the equivalent of 360 degree turn

Edited by MJRMatthew
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...