Home   Help Search Login Register  

Author Topic: Need Help  (Read 1134 times)

0 Members and 1 Guest are viewing this topic.

Offline RangerX3X

  • Members
  • *
  • Ranger, out.
    • RangerX3X
Need Help
« on: 18 Aug 2005, 01:09:47 »
I want to be able to end a mission by the Platoon Leader calling for extraction by Radio whatever.

I want the trigger to check to see if both objectives in the mission - obj1 & obj2 have been completed then end the mission with end 1. If one or both objectives are not met, I want the request for extraction to end the mission with end 2 - mission failure.

Forgive the noobishness of the Q, however I am not exactly certain what to search for and do not have a ton of time to pour over tut's.

Any help would be appreciated - thanks!!!

 ;D
Ranger, out.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Need Help
« Reply #1 on: 18 Aug 2005, 02:07:18 »
upon completion of each objective set a variable to true (say objective_1,objective_2)

2 triggers

both set to whatever radio you want, but the same for both

trigger 1
end1
condition:this and objective_1 and objective_2

trigger 2
end2
condition:this and not (objective_1 and objective_2)
« Last Edit: 18 Aug 2005, 02:08:29 by Triggerhappy »

funkster

  • Guest
Re:Need Help
« Reply #2 on: 18 Aug 2005, 03:23:30 »
Forgive me if Im wrong, but if undestand correctly, then what you have suggested Triggerhappy, should actually be;

trigger 2
end2
condition:this and not (objective_1 OR objective_2)

(does that work?)
Cause RangerX3X wanted it so that if one of the objectives were not met it would fail, not both....

I think then the whole thing has to change to:

condition:this and not ((objective_1)  OR (objective_2))


« Last Edit: 18 Aug 2005, 03:25:39 by funkster »

Offline RangerX3X

  • Members
  • *
  • Ranger, out.
    • RangerX3X
Re:Need Help
« Reply #3 on: 18 Aug 2005, 17:52:47 »
Neither one work.
« Last Edit: 18 Aug 2005, 23:32:13 by RangerX3X »
Ranger, out.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Need Help
« Reply #4 on: 19 Aug 2005, 00:33:41 »
yes funkster is right, my code would execute if both objectives were not met

ranger, did you set the variables objective_1 and objective_2 to true upon completion of your objective

"1" setobjstatus "done";objective_1 = true

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Need Help
« Reply #5 on: 19 Aug 2005, 00:40:16 »
RangerX3X, these kind gentlemen have posted what is essentially the correct solution.   It does work.  

What did you do?   How do you know it didn't work?    The more you tell us, the better chance we have of helping you.    ;)
« Last Edit: 19 Aug 2005, 00:40:45 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline RangerX3X

  • Members
  • *
  • Ranger, out.
    • RangerX3X
Re:Need Help
« Reply #6 on: 19 Aug 2005, 02:10:04 »
1. "1" setobjstatus "done";objective_1 = true

This does not work in the game. It returns "unknown operator". If I remove the "set" it will take it.

2. "upon completion of each objective set a variable to true" I am not great with trigger conditions and had no idea what you meant was "objective_1 = true".

So what I have is this in the test:

c1 Civilian - Objective 1 is to kill him.
c2 Civilian - Objective 2 is to kill him.
Radio Alpha trigger to end the mission - fail if either one of the objectives is not met, and win if both are met.

For the 1st objective trigger I have this:

Condition: not alive c1
Action: "1" objstatus "done"; objective_1 = true

For the 2nd objective trigger I have this:

Condition: not alive c2
Action: "2" objstatus "done"; objective_2 = true

Both triggers work and produce the check marks on the objectives in the briefing book.

The triggers I set for Radio Alpha has this:

Activation: Radio Alpha
Type: End # 1
Condition: this and objective_1 and objective_2

Activation: Radio Alpha
Type: End # 2
Condition: this and not ((objective_1)  OR (objective_2))

When I kill both c1 & c2 and then call Radio Alpha, it ends the mission with the End # 1. When I kill only one or the other, then call Radio Alpha, nothing happens. I am still in the mission and still have Radio Alpha available no matter how many times I select it. Same thing occurs if I try to call Radio Alpha having completed no objectives - it just sits there as if it never executed.

Test mission is attached.


Ranger, out.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Need Help
« Reply #7 on: 19 Aug 2005, 08:32:55 »
erm, fogive my intruding, but isn't the correct term objstatus, without the 'set'?

also, try modifying the brackets in the end triggers thus:

Code: [Select]
this and (not (objective_1)  OR not (objective_2))

EDIT - it doesn't work because flashpoint doesn't yet recognise the variables objective_1 and objective_2. i defined them in the init line of c1 and it works now - see attached.
« Last Edit: 19 Aug 2005, 08:46:21 by bedges »

Offline RangerX3X

  • Members
  • *
  • Ranger, out.
    • RangerX3X
Re:Need Help
« Reply #8 on: 19 Aug 2005, 13:29:30 »
Works perfectly! Thank you very much. I appreciate the responses from everyone.

 ;D
« Last Edit: 19 Aug 2005, 22:51:32 by RangerX3X »
Ranger, out.