What's new

Anyone care to construct a walk through?

ZeroZero

Senior Member
Im new to scripting, read a bit but would like to see a walk through of creating some useful but basic script, for maybe a bundled instrument. There is still something missing in my understanding of how to put all the code together.- usefully
Anyone oblige?
 
Hi ZeroZero,
welcome to the forum!

Do you have any particular task that you would want to solve using a script?
The best way to learn I think is to try to implement some idea yourself and ask questions when you need to. One area where I find the KSP documentation PDF is lacking is how to use loops. If you want to see some more examples of using while-loops you can check out the Iterative execution section of my KSP tutorial. Maybe you could try to understand the code in that and the two following sections. Then you could try yourself to expand that arpeggiator script to let the script user choose between different scales and playing speeds.

Cheers,
Nils
 
Andrew, I think he does all this stuff during the time he 'claims to be sleeping' :wink: . Just kidding of course, most impressive Nils.

Bob
 
Hi ZeroZero,
welcome to the forum!

Do you have any particular task that you would want to solve using a script?
The best way to learn I think is to try to implement some idea yourself and ask questions when you need to. One area where I find the KSP documentation PDF is lacking is how to use loops. If you want to see some more examples of using while-loops you can check out the Iterative execution section of my KSP tutorial. Maybe you could try to understand the code in that and the two following sections. Then you could try yourself to expand that arpeggiator script to let the script user choose between different scales and playing speeds.

Cheers,
Nils

dude you should get paid for the stuff you do. imagine all those talents like nils doing it for a hobby and then you have like programmers sitting in well paid positions in big companies and all they create is a big pile of shit each day.
 
Hey guys,
thank you for your kind words.
This tutorial is something I wrote some six weeks ago. After writing it I couldn't make up my mind whether it really was useful as a complement to NI's tutorial, so I haven't really announced it anywhere. I had some people try it out but didn't receive much feedback. It's still not completely finished and the language hasn't been corrected, but I thought someone may still find it useful.

I actually think the PDF tutorial is quite good, but I wanted to write something more structured showing that all this seemingly complex code is built on some quite simple core concepts. Any questions or suggestions that can help me improve the tutorial are very welcome.

Cheers,
Nils
 
Any questions or suggestions that can help me improve the tutorial are very welcome.

Cheers,
Nils

When I get done with these crazy dealines I'll take a look at it... and some of the new scripts that other people have written... until then, I'll just be stopping in to say "hi" during my breaks :smile:

T
 
Thanks for your input guys. I have been busy actually making music and confess learning scripting has been on the back burner. I have read Nils tutorial and agree its excellent and the contributions from Big Bob are also outstanding.
When I read it, I was familiar with all the programming terms from a university course I did before & other programmes I have made, but I haven't programmed for at least five years and I am definitely rusty.
What I need to do is find a very simple script and analyse it. Then work out from there. I think this is the way for a newby like me to go. Maybe there is a bundled instrument that has a simple script I could see? I can check this out myself, but suggestions welcome.

The suggestion from Kotori to look at his iterative script will be looked into, I was wondering if the iteration would do my head in, at this stage, I want something mind numbingly, stupidly, simple to begin with.

I acknowledge that i also should spend more time with the PDF at this stage

Thanks to all for your welcomes

Zero
 
Hi again Zero,
maybe you could have a look at the Humanizer script bundled with K2. It's not extremely simple but it shows many of the common elements of KSP, it's easy to understand what it's supposed to do, and it does things in a sequential fashion which should make it a little easier to follow. For even simpler scripts I recommend studying the example scripts in the PDF.

Cheers,
Nils
 
Top Bottom