Home   Help Search Login Register  

Author Topic: first steps in missions building  (Read 1752 times)

0 Members and 1 Guest are viewing this topic.

Offline Patagonic

  • Members
  • *
first steps in missions building
« on: 14 Feb 2008, 12:50:41 »
Hello, I'm new to this game and I've got really impressed by the editing capabilities of the engine. I'm trying to build new missions, I've learned a lot in the last 3 days but I have a couple of questions:
So far I manage to edit waypoints so a soldier can salute or sit in the ground and I also make a pilot and a gunner get in their positions in a Blackhawk, take off  and land again.
The problem is that for the landing I use the get out action for the pilot, so as soon as the chopper gets to the ground the pilot get out of it.
What I would like to do is, make the blackhawk to land remaining the pilot in his sit make him to wait 2 min in the ground with the engine on and then take off again to another waypoint.
Another question. Is there a tutorial of how does the triggers work?
Thanks in advance for any kind of help you could gave me.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: first steps in missions building
« Reply #1 on: 14 Feb 2008, 15:58:21 »
Hey there, Patagonic! Welcome to the "sewers of Editing" as one of our regulars keeps calling our fine site ;) The capabilities of the editor and the engine are indeed nigh-limitless, as you'll find out, but that does also mean you have a lot of things to learn yet!

Regarding the tutorial, you should try OFPEC's Beginner's Tutorial: you will also find a section under "Adding complexity" that treats triggers. A good read!  :good:

Regarding the landing thing: helicopters and controlling them has -always- been a big hurdle to overcome when it comes to both ArmA and OFP (predecessor to ArmA) editing; they buggers just never want to do what you tell them. A good place to start when it comes to this is the land command. If you try giving the helicopter a simple Move waypoint, and in the on activation line write something like:

Code: [Select]
this land "get in"
The helicopter should head to the waypoint, and then land, hovering slightly above ground with his engine on. As to how to make him hold there for 2 minutes exactly, well...that's a slightly harder nut to crack: you could try having a second waypoint right after the first, that has a timeout of 120 seconds or so (the values in the timeout/countdown sections are always in seconds), and then continue with your waypoints after that. With any luck, the chopper will remain in its "get in" position until the timout is finished.

Alternatively, if you have certain units that need to get in, just synchronize (F6 - drag a line) their Get In waypoint with the choppers Load waypoint, and they should do everything quite automatically. :)

As mentioned though: choppers aren't the easiest beasts to control, so don't lose hope!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: first steps in missions building
« Reply #2 on: 14 Feb 2008, 16:40:02 »
hi Patagonic,

Making and editing missions is tons of fun, and you've come to the right place.  Wolfrug's links to the tutorials are good, and there are tons of other resources, including this scripting tutorial: http://www.ofpec.com/ed_depot/index.php?action=details&id=42  .  I've found that just about every question i have can be answered in something on Ofpec or by someone here, so never fear as you come to various challenges in editing  :)

Offline Patagonic

  • Members
  • *
Re: first steps in missions building
« Reply #3 on: 19 Feb 2008, 23:31:21 »
Thanks for the reply, I followed your advices and I learned a lot. I have a few more questions:
Which is the command to make a unit shoot a practice pop up target?
Which is the command to make a unit to use constantly the binoculars?
What other positions desides "sitdown" can the units have? (for example kneelling down, etc.) What are the activations command for these positions?
So far I'm not using scripts I I'm learning step by step.
I'm building a training base mission for practice, I have new arrivals comming down from a chopper, some other units running in a obstacle field, other soldiers sitting down lisenning intruction from their superior officer, and even a shooting range.
Perhaps when a finished this mission I could uploaded as an example (can others member of this forum download this mission and see it in the editor to use what I learn? How?.)
Sorry, lots of questions.....Still more to come :D     

Offline Carroll

  • Members
  • *
  • Mission Designer (MP-"well tryin to capiche"
Re: first steps in missions building
« Reply #4 on: 20 Feb 2008, 05:36:43 »
To make a Unit change position you can pick from some of these options; http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=s#320
eg
Code: [Select]
YourUnitsName setUnitPos "DOWN"
Similarly you can experiment also with the playMove & switchMove commands. If you browse thru the http://www.ofpec.com/COMREF/ here at OFPEC you will also find a bunch of other cool stuff you can do, just look at the examples given at the end of each COMMAND to show you the correct syntax for each  :good:

Now if you think you are ready to create your very first script, you can try something like this to get your desired binocular effect. Once you've learnt where & how to save your script files to, your list of possibilities are almost endless my friend!..I've added a very simple script for you to try, it simulates an officer looking through the binoculars until a given condition is met;
Just place a unit on the map & name him Officer & put this in his INIT field;
Code: [Select]
[Officer] exec "Binos.sqs"....heres the script
Code: [Select]
;Binos.sqs

;getting the variable
_Officer = _this select 0

;adding Binoculars to the unit (in case the chosen unit don't have em at start)
_Officer addWeapon "Binocular"

;naming the loop sequence
#Loop

;initiating animation phase
_Officer switchMove "AwopPercMstpSoptWbinDnon_rfl"

;setting loop period
~0.05

;adding a condition to cancel the animation if required
?(trig1):exit

;returning script to the beginning of the sequence
goto "Loop"

...now to cancel the script just add the below piece of code to a trigger & when the trigger is activated the animation phase will end  :cool2:
Code: [Select]
trig1=true;Hope some of this is useful to you in setting you in the write direction
« Last Edit: 20 Feb 2008, 06:43:46 by Carroll »

Offline Patagonic

  • Members
  • *
Re: first steps in missions building
« Reply #5 on: 22 Feb 2008, 17:08:01 »
Thanks!!! The script worked great  :clap:
But the Code YourUnitsName setUnitPos "DOWN" didn't work.
I'm going to try again later....

Offline Shadow.D. ^BOB^

  • Members
  • *
Re: first steps in missions building
« Reply #6 on: 29 Feb 2008, 13:34:37 »
For the SetUnit pos command you will have to name your unit, so in the "Name" box on the unit put for e.g "P1"  then the command would be; 

"P1 setunitpos "DOWN"

or to have them kneel it would be;

P1 setunitpos "MIDDLE";