PDA

View Full Version : Gem Editor: Task



Dilust
29-03-2010, 14:20
How Mission Objectives (Tasks) works

Mission Objectives are called Task into the Editor
If you would create a Task you have to go to the Mission menu (F3) and then press the F9 key.
A new windows called Mission Properties will pop-up; now select the voice tasks to open the related menu.

http://img14.imageshack.us/img14/6302/64160657.th.jpg (http://img14.imageshack.us/i/64160657.jpg/)
click on the images to enlarge

A new window, called Mission task, would be showed.
Here you can add (Add...) the mission objectives with a right mouse button click.

http://img687.imageshack.us/img687/6057/99856842.th.jpg (http://img687.imageshack.us/i/99856842.jpg/)

All Tasks have an own id title. Enter the name you like most.

http://img210.imageshack.us/img210/1600/18828704.th.jpg (http://img210.imageshack.us/i/18828704.jpg/)

----------------------------------

http://img697.imageshack.us/img697/985/90720625.th.jpg (http://img697.imageshack.us/i/90720625.jpg/)

You can assign a text description to each Task into the field called “desc”
Those short description will be showed ingame in the Objective Menu (O key).
If you would assign a description you have to:.
1. Press the Add button.
2. Enter a generic title for the text string.
3. Type the description; remember that this is the text that will be showed ingame.
4. Press Enter on keyboard.
5. Press the save button. Note: all text of a mission is saved in a separate language file (.lng); this file is usually located at: C:\Programmi\...\Men of War\localization\mission\...
Additional note: when you distribute the mission do not forget the .lng file... better if you distribute the mission inside a mod structure.
6. Press OK to complete this operation.

http://img98.imageshack.us/img98/1408/53931170.th.jpg (http://img98.imageshack.us/i/53931170.jpg/)

Mission Objectives could be primary or secondary objectives.
If you select the Primary option those objective will be a primary objective; on the contrary it will be considered as secondary objective.

http://img28.imageshack.us/img28/1554/78017500.th.jpg (http://img28.imageshack.us/i/78017500.jpg/)

The field “state” into the Mission task menu indicates the state of the Task at mission beginning.
As standard the task state is “Showed”; other options available are “Hidden” (ie the Task is hidden at mission startup) or “Completed” or “Failed” (I do not know why those options are available at mission startup).

http://img32.imageshack.us/img32/5209/86763810.th.jpg (http://img32.imageshack.us/i/86763810.jpg/)

You can assign an indicator called “Pointer” to each mission task. Those Pointer is a big red arrow that help users to identify the objective
Playing the mission you can call the Objective Menu pressing the O key on your keyboard. Usually near a specified objective there is a Binocular icon, with a click on those icon you will be re-directed to the objective location higlighted by the Pointer.

http://img338.imageshack.us/img338/3406/14352145.th.jpg (http://img338.imageshack.us/i/14352145.jpg/)

Pointer is a special entity available into the Entity menu: Entity->service->pointer

http://img694.imageshack.us/img694/7364/98954599.th.jpg (http://img694.imageshack.us/i/98954599.jpg/) http://img339.imageshack.us/img339/6287/43743134.th.jpg (http://img339.imageshack.us/i/43743134.jpg/)

Do you remember that into the Mission task menu, there are a field called "point"? Well, there you should type a generic text that may identify the Pointer that you would link to the specified Task.

http://img98.imageshack.us/img98/6711/60275116.th.jpg (http://img98.imageshack.us/i/60275116.jpg/)

When you have chosen those text, select the Pointer, press Ctrl+T; in this way you could assign a Tag (an id text) to the Pointer. Press the Add button, type the exact text you have chosen previousely and that you have just added into the point field of the Mission Task menu and press OK.

http://img59.imageshack.us/img59/2676/74902215.th.jpg (http://img59.imageshack.us/i/74902215.jpg/)

Now press Alt+T to check if the tag has been added correctly. If all has been done correctly you can see the famous text in a green colour near the Pointer.

http://img192.imageshack.us/img192/7382/81910073.th.jpg (http://img192.imageshack.us/i/81910073.jpg/)

----------------------------------

Task managament must be done useing Trigger scripts..

Tasks could be used as Conditions and/or Commands inside Triggers.

The “task” command is used to set and change the state of a Task. Options available are Completed (if the task is completed by the user), Fail (if the task is failed by the user), Show (if you would show an hidden task), Hide (if you would hide a showed task).

http://img708.imageshack.us/img708/3532/15938563.th.jpg (http://img708.imageshack.us/i/15938563.jpg/) http://img340.imageshack.us/img340/488/13763829.th.jpg (http://img340.imageshack.us/i/13763829.jpg/) http://img265.imageshack.us/img265/5610/32138459.th.jpg (http://img265.imageshack.us/i/32138459.jpg/)

When a task changes its state or is showed a text message is displayed during the gameplay. A red message indicates failed task, a green message indicates completed task, a blue message indicate just showed task.

http://img697.imageshack.us/gal.php?g=51422121.jpg
(click here to see some examples)

You can use Tasks as Condition when you would use tasks as conditio sine qua non a specified event could not be started. For example I would show the Game Over if the Escape task is fulfilled.

http://img156.imageshack.us/img156/3900/14974086.th.jpg (http://img156.imageshack.us/i/14974086.jpg/) http://img695.imageshack.us/img695/2489/33529510.th.jpg (http://img695.imageshack.us/i/33529510.jpg/) http://img88.imageshack.us/img88/417/17690795.th.jpg (http://img88.imageshack.us/i/17690795.jpg/)

----------------------------------

Download this guide here:
http://rapidshare.com/files/369542155/Tasks_1.0eng.rar

Note: this archive includes the guide above in .pdf and .doc format. A mission (0.mi) file with an example of how tasks works and the mission text file into the language (.lng) file.

If images or file will be missed, please contact me.

Any contribution, like comments, suggestions, questions or criticism are welcomed. Feel free to post your impressions. Thanks.

ngvede
29-03-2010, 15:15
Only one comment for now... Thank you :realbig:

KageToraUK
12-09-2010, 17:27
Excellent tutorial, mate!

I've added a supplement on my YouTube channel: http://www.youtube.com/user/KageToraUK#p/u/0/QMSl41sRRyM

Hope this helps.

Kage