Home   Help Search Login Register  

Author Topic: mission end values  (Read 859 times)

0 Members and 1 Guest are viewing this topic.

SandVoss

  • Guest
mission end values
« on: 12 Apr 2005, 15:12:12 »
Hi,

Im in need of some help for some mission editing. I'm working on an MP mission, that requires the players to complete a series of 4 objectives in enemy territory. After the objectives they have to extract back to their base.
I want the mission to end when at least one of the members of the group is back in the base, and all four objectives have been completed.

How do i do this? I think i would need a trigger to end the mission, maybe if "any member of group" is present, and on the condition of the four objectives being done. But i dont know how to set this condition, of if this is even the correct way to aproach it.

Can anyone help me out?

Many thanks in advance.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:mission end values
« Reply #1 on: 12 Apr 2005, 15:18:45 »
you're on the right track.

create 4 variables, something like obj_01, obj_02, etc. in your init file, set them all to false.

when an objective is completed, set the corresponding variable to true.

finally, in your 'friendly guys present' trigger in the base, put the variable check into the condition field, thus:

Code: [Select]
this and obj_01 and obj_02 and obj_03 and obj_04
that means the trigger will only fire if there's one of the friendly loons present, and all 4 objectives are completed.

hope that helps :)

SandVoss

  • Guest
Re:mission end values
« Reply #2 on: 12 Apr 2005, 15:23:02 »
Ah thanks, that seems like the solution, i will try it ASAP.  :D

By the "init file" you mean the describtion.ext?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:mission end values
« Reply #3 on: 12 Apr 2005, 15:52:00 »
No, he doesn't.

init.sqs is a special file.   description.ext is another, completely different, special file.     See the Tutorial Mission for working examples of both.   snYpir wrote an excellent tute on "how to use objectives and init.sqs" which you must read.   I also recommend my own " guide to mission editing for beginners", which gives an overview of all the stuff like this.
Plenty of reviewed ArmA missions for you to play

Offline Kendo J

  • Members
  • *
  • Britain Has more varieties of cheese than France
Re:mission end values
« Reply #4 on: 12 Apr 2005, 16:26:02 »
I would write the code in the init box in the trigger as

"this && obj_1 && obj_2" etc....

or you can put
"[player, in this list]"
or something like that i cut and paste so many lines i can't remember the syntax but there is a way of doing it so that you don't need to link the trigger to the player group. if you do I would put "whole group present"

for some reason "any group memeber" means the entire group present or not present and "whole group" is any one of the guys in the group...

Regards
Kendo

Offline 456820

  • Contributing Member
  • **
Re:mission end values
« Reply #5 on: 22 Apr 2005, 18:25:49 »
or even group the trigger back to base one with the player or leader of that group and then set the trigger to any member this group and put end#1 and also with all the other triggers to do with the objective so all triggers must be completed with end#1 in to complete the mission