Home   Help Search Login Register  

Advertisement

Author Topic: Mission Ending Problem  (Read 1008 times)

0 Members and 1 Guest are viewing this topic.

Offline snafu

  • Members
  • *
Mission Ending Problem
« on: 14 Jan 2018, 17:46:17 »
Hello all

It's good to see OFPEC still around, the wealth of knowledge in these boards is immeasurable! I can't believe it is just short of 10 years since I submitted my ArmA mission here. It was the first mission I ever released and it was the help I got from the guys here that gave me the knowledge to get it up to scratch. If it weren't for this place, I don't think I'd have ever successfully completed a mission in the editor. It was such a great time to be active in the community and these forums :D

Hopefully I can get help with this problem I have been having, as well as some assistance with mission fail criteria.

So, I've got a mission for good old OFP that is nearing release. I've been playing OFP as I have a Macbook Pro and the recent port has allowed me to play it again. I was away with work over the years moving around so I've been out of the game for some time now and my gaming rig is still in storage, although I am back home now.

Anyway, my mission has 5 objectives which are marked as completed when the player achieves them. Once they are completed, the player heads to the extraction point. At the extraction point, there is a trigger grouped to the player so it is activated when they enter its radius and all of the objectives have been completed.

In the trigger's condition field I have:

Code: [Select]
obj3completed AND obj4completed
In the activation field I have:

Code: [Select]
[] exec "dia3.sqs"; "5" objStatus "DONE"; obj5completed=true
dia3.sqs contains radio chatter where the player requests extraction from HQ.

The problem is that the trigger is not activating. I've used this system in a mission before that I released earlier in 2017 but I didn't run into any problems then and I'm not sure why it's not working this time.

Any assistance would be greatly appreciated!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Mission Ending Problem
« Reply #1 on: 15 Jan 2018, 15:13:08 »
*raises up from below the thick dust layer*

Are the variables obj3completed and obj4completed set to false in the misson init.sqs or somewhere?
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline snafu

  • Members
  • *
Re: Mission Ending Problem
« Reply #2 on: 15 Jan 2018, 19:11:12 »
No, would doing so be good practice?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Mission Ending Problem
« Reply #3 on: 15 Jan 2018, 20:23:19 »
Yes, you should always init all global variables to some default value.

The game doesn't handle for example boolean (true/false) checks well with nil values.
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline snafu

  • Members
  • *
Re: Mission Ending Problem
« Reply #4 on: 16 Jan 2018, 00:38:31 »
Excellent, thank you. The mission now finishes, but not at the time or place intended.

The fifth and final objective is for the player to reach the extraction point with their squad. Therefore, I have grouped the trigger to the player and set it to activate when the entire group is present.

The condition field:

Code: [Select]
obj3completed and obj4completed
Activation field:

Quote
[] exec "dia3.sqs"; "5" objStatus "DONE"; obj5completed=true

The trigger fires as soon as objectives 3 and 4 are completed. Whereas it should complete when the objectives are completed and the player's group is at the extraction point. Consequently, the end trigger is activated with every objective being completed and the mission ends.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Mission Ending Problem
« Reply #5 on: 16 Jan 2018, 08:37:39 »
Ah, you need to edit your extraction point trigger condition to:
Code: [Select]
this and obj3completed and obj4completed
this means the trigger settings have to be met, basically trigger is true..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline snafu

  • Members
  • *
Re: Mission Ending Problem
« Reply #6 on: 19 Jan 2018, 23:32:37 »
Fantastic, the mission ends as intended. Thank you!