Home   Help Search Login Register  

Author Topic: Deactivating an END2????  (Read 3234 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Deactivating an END2????
« on: 07 Jul 2004, 02:38:59 »
My mission that iam making has a trigger that sets off an alarm.  Then that trigger makes anoteher trigger that i have end the mission because the alarm was set off.  I only want the alarm to set off when you are spotted before objective 1 is complete, not after.

My question is, how can i Deactivate the "END2" trigger, so the mission does not end when the alarm is set off and  objective 1 is complete. Becuase objective 1 is to destroy the hinds and then once the hinds are destroyed it wont matter if the alarm is set off or not.  If anybody could help me out that would be great, that's the last thing i need to do to my mission.
Who's hyped for Arma4, long live Arma!

Offline ZNorQ

  • Members
  • *
  • ehr... uhm... duh...
Re:Deactivating an END2????
« Reply #1 on: 07 Jul 2004, 10:24:41 »
If I understand you correctly, you want objective one achieved without setting an alarm. If alarm is triggered - the game is ended in a loss. But if objective is completed - the alarm won't matter? So you need atleast 2 triggers; (I assume you are West? Forgive me if I'm wrong  ;))

First trigger that is an area trigger set to END2, WEST DETECTED BY EAST - and which is covering the area in question. In the condition field you could put something like "this and !ObjectiveComplete"

ObjectiveComplete is a boolean (true or false) variable that is set to true if objective one is completed;

The next trigger is the objective 1 completed trigger. Now, as I don't know what the objective is all about, I'll just use an example; Lets say you are going to kill an officer - id enemyCaptain - you use a trigger with the following settings;

Condition: "!(alive enemyCaptain)"
OnActivation field: "ObjectiveComplete = true"
(if this is a MP mission - I suggest you use the publicVariable "ObjectiveComplete" too, in which case the onActivation line would look like this;
ObjectiveComplete = true; publicVariable "ObjectiveComplete"

I hope this helps you out...

There are problably other and better ways to do this, but it should work..

ZNorQ

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re:Deactivating an END2????
« Reply #2 on: 07 Jul 2004, 15:45:03 »
HI, thanks for your reply, it didnt work,  :( . Okay this mission you play as a black op, the name is his name box is "Jay". then you have to find enemy hinds and destroy them, there two of them, the name are "Mi1", "Mi2".  First of all i have alarm triggers in each town, and when they are set off the mission fails a few seconds later, only if objectives 1 is incomplete, but like you said if objective 1 is complete, it won't matter if the alarm is sounded.  Okay here are my triggers that i have that complete objective 1.  

-----TRIGGER 1-------(In each enemy base)

AXIS A & B= 575
West/Detected by east
TYPE: Switch
Condition: this
ON ACITAVTION: Alarm=true; Hint "You were spotted"; "1" ObjStatus "FAILED"; endmission=true

Alright on to talking about it. I have the "TYPE" in the trigger as "SWITCH", because it switches to the alarm that actually sounds, and then to the deactivation alarm that deactivates the alarm. But we really only need to worry about the 1st trigger that sets it off. NOw the first trigger, i have syncronized to each enemy unit on the map so they all go crazy once the alarm sounds. And then the "Endmissin=true" i have there becuase it ends the mission once the alarm is triggered before objective 1 is complete, and so it goes to another trigger and ends it.  

----TRIGGER 2-----(MAKES A CHECK IN THE BRIEFING ONCE THE HINDS ARE DESTROYED)

AXIS A & B: 0
CONDTION: not (alive mi1) && not (alive mi2)
ON ACTIVATION: "1" ObjStatus "DONE"; hint "Objective 1 Complete"; jay addrating 4000

Alrightk, that's pretty self exsplanatory. So i hope you get what i mean now, i tried doing what you said and it didnt work. Maybe you could explain it a little better or but maybe what i put will make up for that.. Thanks.   :)
Who's hyped for Arma4, long live Arma!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Deactivating an END2????
« Reply #3 on: 07 Jul 2004, 15:56:32 »
-----TRIGGER 1-------(In each enemy base)

AXIS A & B= 575
West/Detected by east
TYPE: Switch
Condition: this && !objective1Complete
ON ACITAVTION: Alarm=true; Hint "You were spotted"; "1" ObjStatus "FAILED"; endmission=true

----TRIGGER 2-----(MAKES A CHECK IN THE BRIEFING ONCE THE HINDS ARE DESTROYED)

AXIS A & B: 0
CONDTION: not (alive mi1) && not (alive mi2)
ON ACTIVATION: "1" ObjStatus "DONE"; hint "Objective 1 Complete"; jay addrating 4000; objective1Complete = true
(of course you can cook up a variablename of your own..)


Should work, but no guarantees, this is no car dealership... ;D
« Last Edit: 07 Jul 2004, 15:57:13 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Deactivating an END2????
« Reply #4 on: 07 Jul 2004, 16:09:55 »
You would also need to write this in your init.sqs

objective1complete=false

This is called initialising the variable.    "Initialising" a variable just means telling the game that this variable is going to be used somewhere.    When the game meets a variable it doesn't know about, for example in trigger1 in HateR_Kint's answer, it defines the whole expression as false.    If you didn't initialise the variable, the expression "this && !objective1complete" would always be false and the trigger would never fire.

In this case the variable objective1complete is a boolean variable - it is true or false.   variables can also take values like 3 or "M16".     One of the important ways variables are used is to convey information from one trigger to another, which is what is happening here.

Trigger1 does not in fact need to be a switch trigger, because the mission is ending so it doesn't matter what the guarding groups do.    The remaining missing piece of this jigsaw is a third trigger, which looks something like this

AXIS A & B= 575
West/Detected by east
TYPE: Switch
Condition: this
ON ACITAVTION: Alarm=true

The vital thing to grasp is that a trigger can only detect one condition, one thing happening.   You have been trying to detect two different things (detected and hinds destroyed on the one hand, and detected but hinds not destroyed on the other) with only one trigger, which is why it's not been going well.    ;D

Minor detail in case you're not sure:
&& means and
! means not

"this && !objective1complete" means "this and not objective1complete"

ZNorQ and HateR_Kint have both said much the same thing in different ways, which hopefully will make things clearer.
Plenty of reviewed ArmA missions for you to play

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re:Deactivating an END2????
« Reply #5 on: 07 Jul 2004, 16:10:21 »
LOL, Not a car dealership... Thanks but that didn't work also.  The sucky part is you can't put anything in the conditon field of the alarm trigger, besides "THIS" other wise it wont set off, i've tested it out.. This is hard. i don't think what you put will deactivate the END2 Trigger.  Maybe i should give the END2 Trigger a name in the "TEXT" filed. THen do something with that.  I don't know.  It's a little confusing, i don't know if anbody has tried to deactivate an end2 trigger before. :)
Who's hyped for Arma4, long live Arma!

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re:Deactivating an END2????
« Reply #6 on: 07 Jul 2004, 16:12:12 »
Thanks MACGUBA, i havent tested yours out yet, i was just sayig the other guys didnt work......
Who's hyped for Arma4, long live Arma!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Deactivating an END2????
« Reply #7 on: 07 Jul 2004, 16:23:52 »
The name field of the trigger doens't come into it at all - forget about it.   It's all about condition fields and boolean variables.

This is hard, and its hard to explain too.     Forget the technicalities of what to put where in what trigger, before we get to that you need to get clear in your head how many triggers you need.    (Try thinking about them under the old fashioned name "sensors":  they sense things, detect them.  What things do you want them to sense?)    Don't worry, you're not the first person to have this problem and you won't be the last.  

The other guys' answers do basically work although they might require a bit of detailed tweaking before they fit your mission perfectly.  It's very rare to see an answer to a question that can just be dropped into a mission, it almost always requires some interpretation and understanding along the way.
« Last Edit: 07 Jul 2004, 16:26:58 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re:Deactivating an END2????
« Reply #8 on: 07 Jul 2004, 16:41:50 »
Your didnt' work MACGUBA, do you want me to send you my mission and you can take a look at it in the mission editor, so you know what im talking about???
Who's hyped for Arma4, long live Arma!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Deactivating an END2????
« Reply #9 on: 07 Jul 2004, 17:04:38 »
No.   ;D   We understand what the problem is:    the information you need to solve it is already in this thread.    Read through the thread again, carefully:  if there any bits you don't fully understand ask and we'll explain them better.    (You're probably getting frustrated that it doesn't work so it might be better to sleep on it, let your back brain digest what you've read and come back fresh tomorrow.)

Try drawing a flow chart of what you want to happen, that sometimes helps.   You know the kind of thing I mean:   has objective1 been completed?  Yes -> one direction, No -> another direction.

Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Deactivating an END2????
« Reply #10 on: 07 Jul 2004, 23:21:54 »
My example works, tested it...

Of course, macguba is right about the variable initalisation...
It comes so automatically for me that I don't even notice it anymore, so that's probably why I failed to mention that... sry...

And, of course the alarm won't set off because you have the alarm=true variable there...

maybe you should make another alarm trigger with condition: this && objective1Complete and have the Alarm=true also in that trigger so when the objective 1 is completed the alarms would still sound, but would not result in END#2 trigger 'firing'...

Oh, and I assume the END#2 trigger of yours has the condition: endmission...
« Last Edit: 07 Jul 2004, 23:22:45 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

CrashnBurn

  • Guest
Re:Deactivating an END2????
« Reply #11 on: 08 Jul 2004, 01:23:41 »
Why don't you just change the condition of your first trigger to:

this && (alive mi1) or this && (alive mi2)

If one or both of the helos are alive the alarm will sound. If they're both destroyed the trigger won't activate.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Deactivating an END2????
« Reply #12 on: 08 Jul 2004, 06:20:56 »
Why don't you just change the condition of your first trigger to:

this && (alive mi1) or this && (alive mi2)

If one or both of the helos are alive the alarm will sound. If they're both destroyed the trigger won't activate.
Hmm...

Would work, but of course it would be quite odd to have no alarms sounding if you infiltrate a base with none of those targets alive...
I think they would generally sound the alarm in any case if an nme was spotted... ::)

Alternatively, NightJay, you could separate a endmission trigger (I still presume you use the endmission to actually activate the END#2 trigger) from the alarm trigger, so you would have the alarms sounding when Alarm=true and then in the new trigger
Condition: Alarm && !objective1Complete
On Act.: endmission=true...
« Last Edit: 08 Jul 2004, 06:22:06 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

CrashnBurn

  • Guest
Re:Deactivating an END2????
« Reply #13 on: 08 Jul 2004, 08:22:01 »
Hmm...

Would work, but of course it would be quite odd to have no alarms sounding if you infiltrate a base with none of those targets alive...
I think they would generally sound the alarm in any case if an nme was spotted... ::)

Alternatively, NightJay, you could separate a endmission trigger (I still presume you use the endmission to actually activate the END#2 trigger) from the alarm trigger, so you would have the alarms sounding when Alarm=true and then in the new trigger
Condition: Alarm && !objective1Complete
On Act.: endmission=true...


Ya I agree, but, he says in the first post "I only want the alarm to set off when you are spotted before objective 1 is complete, not after."  ???

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Deactivating an END2????
« Reply #14 on: 08 Jul 2004, 09:05:48 »
Oh yeah... Sry... :P

I somehow got tangled in the
Quote
it wont matter if the alarm is set off or not

Well, the alarms should go off all times then... :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.