Home   Help Search Login Register  

Author Topic: Trying to perfect a simple mission  (Read 1692 times)

0 Members and 1 Guest are viewing this topic.

Offline Bahger

  • Members
  • *
Trying to perfect a simple mission
« on: 15 Feb 2010, 05:12:52 »
Hey guys.  I posted my first mission, "USMC Village Raid", in the SP beta testing forum today:

http://www.ofpec.com/forum/index.php?topic=34655.0

As you can see, it got savaged by one remarkably unsympathetic user, but before I remove it, or give up on ArmA 2 mission design, I'm going to make a last attempt to get it all right.  My problem has been that I hate to have to ask about everything on forums, yet a lot of the documentation is either outdated (written for OFP/ArmA) or way too advanced for the beginner.  I have no experience in coding language, have not wrapped my brain around scripting yet and for the time being am hoping only to achieve some mastery of the Editor functions.  To that end, and in an attempt to address this poster's valid criticisms, unpleasant as he makes himself sound in expressing them, can anyone help me with the following:

- How do I incorporate an overview so that the player can look at the map/briefing before the mission starts?

- I have an End #1 trigger but the debrief does not incorporate mission tasks-accomplished headers.  In which external text file or Editor field do I place the following code to address this:

Code: [Select]
MAG_tskObj0 settaskstate "Succeeded" for task # 1
MAG_tskObj1 settaskstate "Succeeded" for task # 2

-  I also need to know how to eliminate plotted route lines for a unit from the map screen.

-  I want to learn more about "modules", groups and synchronisation and the basic underlying principles of solid mission construction.  My mission coding  might have been jury-rigged when compared with the standards of an expert but it plays well, and is well balanced.  I will never be an expert unless I get the opportunity to learn how the Editor ninjas do it.

« Last Edit: 15 Feb 2010, 09:52:51 by Bahger »

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Trying to perfect a simple mission
« Reply #1 on: 15 Feb 2010, 15:49:55 »
Some quick answers (still haven't finished your mission, mind):

- The search function on these forums is really quite good! You should consider using it. All scripting commands etc. are backwards compatible, so if there's advice on how to use something for OFP or ArmA, it'll still be applicable for Arma 2 (in most cases).
- The Beginner's tutorial is currently being revised, but it IS mostly applicable in Arma 2 still (with the exception of the briefing stuff).
- Mr.Murray's editing guide, although for ArmA, is still almost 100% applicable (waypoints, little script snippets, etc).
- And finally, asking here always works as well!

-> Overview: As Zipper5 suggests, use ArmAEdit. The syntax for Overviews is unchanged between ArmA / Arma 2. An overview is basically just a html file, so it's not that complicated - if nothing else, steal one from another mission, open it with notepad, and just change the text content + the picture, and shazam!

-> Setting tasks to succeeded etc. is really a polishing feature, not a mission-critical one (although it looks silly if you've just finished the mission and both tasks are still 'unchecked'). The code needed you can find here: setTaskState (sorry for linking out, but our COMREF doesn't mention the possible task states...). I don't know what the names of your tasks are, but you probably do :) You just need to set these as succeeded before the mission ends, but writing it in for instance the On Activation field of a trigger, as such (change YourTask to the name of your tasks):

Code: [Select]
YourTask setTaskState "Succeeded"
-> Waypoint lines. You probably set the waypoints to "Always Visible" (double-click to edit, bottom of the waypoint dialog screen) -> change this to "Never Visible", and they should disappear from the map.

-> Modules: Many of these are pretty advanced (such as High Command and Artillery) but most work simply by synchronizing (F6, drag line to group member)  the module with the player - the Ambient modules for instance function like this, as well as the SOM and the First Aid modules (although with FA, which group you synchronize it to determines which group gets first aid). I suggest experimenting with them, but they're really not necessary in general for a mission to function.

As to the basic underlying principles of mission construction, this is something that is best learnt in the same way as one learns how to write a book: by reading, reading and reading some more, and then writing, writing and writing some more (and hopefully getting some feedback in between). There are tutorials and advice to be given, but ultimately you have to find what you like yourself out there, and then try to emulate that. The Arma 2 engine is an incredibly powerful tool that can do just about anything quite easily. Sometimes the most difficult things are the easiest, and sometimes what looks really easy (like having a helicopter come in and pick up a squad, then land and let them out) can take hours and hours of work :) We used to have a lot more tutorials up in the Ed.Depot, but unfortunately over the years database crashes, hackers and other unfortunate things have wittled away our collection :-/

Good luck for now! Guess the answer got a little longer than planned :D

Wolfrug out.



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

Offline Bahger

  • Members
  • *
Re: Trying to perfect a simple mission
« Reply #2 on: 15 Feb 2010, 20:03:27 »
Great advice, Wolfrug, thank you very much for going to the trouble to respond in detail.

I do try to accomplish as much as I can with Search; it's bad manners to fire off questions without at least a cursory investigation.  The OFPEC Beginner'sTutorial is great, in fact it was seeing this unintimidating document that encouraged me to dive into the Editor in the first place.  I have Mr. Murray's Deluxe Editing Guide, too.  It's fantastic, but better on the intermediate-to-advanced stuff than beginner-level.

It was ambitious of me to use a helo insertion/extraction in my first mission, and a "take the town and kill everyone in it" would have been an easier mission task to implement, but I wanted a "destroy objective" task so that the player could face the challenge of when to withdraw.  I find "kill everything that moves and then declare victory" missions in all sims a bit goofy.  After much trial-and-error I think the mission works as intended but, again, the design is not yet elegant.

Again I really appreciate the assist and intend to put back into the OFPEC community at least as much as I have taken from it.

I will post the updated mission in the original thread in SP Beta Testing, with standard info re. the updates, if that's the correct procedure.


Offline RangerX3X

  • Members
  • *
  • Ranger, out.
    • RangerX3X
Re: Trying to perfect a simple mission
« Reply #3 on: 17 Feb 2010, 03:29:29 »
As far as killing everything that moves and declare victory goes, sometimes it is useful for atmosphere to satisfy a task/objective with a "this list" trigger. This allows you to complete a task with a defined number of enemy left, such as:

You are part of BLUFOR attacking OPFOR at some location -

Create a trigger and set the side to OPFOR, then place this in the condition field"

{alive _x} count thislist <3

The <3 means that as soon as there are less than three enemies in the trigger area, the objective/task will be "complete". Please note that the units must start the mission within the trigger zone so make it large enought if you decide to try this out.

Makes it interesting and solves some of the "where's waldo" crap...
Ranger, out.

Offline Bahger

  • Members
  • *
Re: Trying to perfect a simple mission
« Reply #4 on: 17 Feb 2010, 09:41:04 »
This is really good information.  No r/l military op depends for success on killing everything that moves so it's great to know how to work around this.

I am going to read MrMurray to learn as much about the syntaxes for the Editor as I can.  It will be a long while before I can script with confidence but I do think I can master the Editor with some hard work.  Code does not come naturally to me, it's not how my mind works.

What is the function of the curly parentheses
Code: [Select]
{ } in editing commands?

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Trying to perfect a simple mission
« Reply #5 on: 18 Feb 2010, 08:29:17 »
The curlies are used to add code that will be executed. Example:

if (group player == myGroup) then {hint "You are playing in myGroup"}

The if statement equals the condition line in a normal trigger. The () is the actual statement. Then represents the on activation part of a trigger. Everything inside the { } gets executed, provided that the if part is true.
OFPEC | Intel Depot
RETARDED Ooops... Retired!