Jump to content
Sign in to follow this  
oblisk

Beginner's questions

Recommended Posts

I've been reading the Wiki and the mission editing FAQ, but I fear that I have not been able to find the fundamentals tutorial for scripting. Mainly fits under "Where does the lines go?" I am trying out Mandoble autotakeoff script, because I want to take videos of fixed wing aircrafts taking off.

Here is a sample of the step by step guide he has provided;

Quote[/b] ]1 - Place a plane somewhere near the desired take off position, and note the desired take off direction (for example, North, 0 degrees).

Simple enough, I get this. I'm not quite sure it is telling me to place an empty plane or the Player's (me) plane.

Quote[/b] ]2 - If needed, select several taxi positions, you may use markers for that.

Also got it.

Quote[/b] ]

3 - Build up the positions array, remember that the last position is from where the plane will initiate the take off run.

For example, lets say we have three taxi positions and a take off position, we may use markers named "mk_taxi1", "mk_taxi2", "mk_taxi3" and "mk_takeoff" (the names are not important, and you may use anything you want, no necessary markers).

The position array would be [getMarkerPos "mk_taxi1",getMarkerPos "mk_taxi2",getMarkerPos "mk_taxi3",getMarkerPos "mk_takeoff"]. Do not place taxi positions too close to each other, the planes need room to move between them.

This is where it gets confusing. What exactly does he mean by "build up an positions array?" Just place the desired taxi pinpoints on the map? Also, where do I input the example code?

Quote[/b] ]

4 - Now lets select maximum speed when taxiing, speed to reach before raising the nose, speed to reach when climbing up and the climbing angle. For example, 30 Kmh for taxiing (when turning while taxiing the planes will reduce speed to half the maximum taxii speed), 170 Km/h before raising the nose, and then raise the nose 10 degrees and accelerate until 350 kmh.

So far, this is what we have:

[myplane, false, 30, 170, 350, 10, BLANK, [getMarkerPos "mk_taxi1",getMarkerPos "mk_taxi2",getMarkerPos "mk_taxi3",getMarkerPos "mk_takeoff"], 0, BLANK, BLANK, BLANK, BLANK]execVM"mando_takeoff2.sqf"

I understand the different values I can input in the blanks.

Quote[/b] ]

The final result is:

[myplane, false, 30, 170, 350, 10, 0.11, [getMarkerPos "mk_taxi1",getMarkerPos "mk_taxi2",getMarkerPos "mk_taxi3",getMarkerPos "mk_takeoff"], 0, 1, 3, true, ""]execVM"mando_takeoff2.sqf"

I understand what all the numbers are and perhaps the line itself mean, but again, where exactly do I input this? I have tried putting it in the "initialization" field of the airplane, but it gives me an error.

It may feel like I'm nagging, but I have been reading through the forums for a good solid hour and I haven't gotten the answers I've been looking for yet confused_o.gif Forgive me if I sound too forwarding.

In short, I cannot find a tutorial for the beginner's beginner, if it even exists. The tutorials I have seen so far just teaches the specifics of "how-to-make-a-specific-script" not the mechanics of how to use them in the editor. I am also currently looking through the Uber Editor Tutorial and the old OFP Editing FAQ Forum.

Here is the entire guide from the script readme:

http://pastebin.com/m28850216

p.s I am using the original ArmA Editor.

edit: I have found a a simpler tutorial here:

http://www.flashpoint1985.com/cgi-bin....t=54051

Where exactly do I place the "AITakeoff.sqs" file? I have placed it in Documents and Settings\BLANK\My Documents\ArmA\missions and \ArmA\Missions and the editor still says that it cannot find "AITakeoff.sqs"

Share this post


Link to post
Share on other sites

Well... Understanding the fundamentals of scripting, and understanding somebody's fairly complex ready-to-use script are two totally different goals.

You could, theoretically, find out exactly how to use Mandoble's script, but still not understand the least bit of it.

But if you want to learn scripting, in order to be able to write something like that from scratch yourself at some point, requires a different approach. And the commitment of a significant amount of time - expect to spend a few weeks to months (depending on your previous programming experience) to really understand the fundamentals of ArmA scripting.

And don't get too fixated on tutorials either. It is very hard to teach programming from scratch (this applies to *any* programming language, just just ArmA scripting). It's a way of thinking that you have to acquire yourself. It's not a specific skill that anybody can teach anybody. You have to discover yourself what approach works for you, and work your way up. Any tutorial will always only represent the approach that worked for the specific person that wrote the tutorial (and on top of that, he may not be a good teacher either, since *knowing* and *teaching* are two very different skills).

So - with all that in mind, here's my universal programming tutorial...

a) Look through some of the available scripts to see which commands are the most common.

b) Look up these commands on the Wiki, and try to understand what they actually do.

c) Create EXTREMELY SIMPLE scripts to test out what the commands do, and how to use them.

d) Repeat this over and over again, until you are familiar with a good basic set of commands.

e) Take those existing scripts you picked up in step a) and try to make sense out of them now (either by reading them over and over again, or by modifying them, to see what kind of difference those changes make).

Share this post


Link to post
Share on other sites

It's not the scripting itself I need help with..

I can understand what most scripts actually do, but it's the multi-lined scripts I get a little confused with, not as to how they work, but how I use them. ArmA seem to use *.sqs files, which I can edit with any text editor. Do I simply open an editor, save the mission, alt tab out, and create the sqs file in the missions folder I've just created?

I'm really not understanding the external calls ArmA engine does! My only previous programming experience is Java. huh.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×