Home   Help Search Login Register  

Author Topic: how to active a trigger after another trigger has activated?  (Read 3695 times)

0 Members and 1 Guest are viewing this topic.

Safari

  • Guest
how to active a trigger after another trigger has activated? I know something must be in the condition field, but couldn't find from faq's.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:how to active a trigger after another trigger has activated?
« Reply #1 on: 12 Apr 2004, 18:23:22 »
1st trigger:

cond: whatever
on act: trigg2=true

2nd trigger:

cond: trigg2
on act: whatever

:beat: *Gets Shot* :beat:

Safari

  • Guest
Re:how to active a trigger after another trigger has activated?
« Reply #2 on: 12 Apr 2004, 18:49:31 »
Thanks pal, it works :) My question was incomplete.. I would like the 2nd trigger activate after 1st has activated AND resistance units are present at the  2nd trigger. I can't make this happen for some reason.

I used your example and it activates the 2nd right after the 1sy and doesn't wait unit to be present. Sorry for not asking the right question right away :)

Offline Jezuro

  • Members
  • *
  • Hookah 4 lyfe!
    • Jezuro's ArmA Workshop
Re:how to active a trigger after another trigger has activated?
« Reply #3 on: 12 Apr 2004, 19:00:39 »
Set the 2nd trigger on Resistance-Present (I think you already did  ;)) and for the example by the Real Armstrong use this condition :

trigg2 AND this

this is condition that's set on TRUE when all of the basic trigger conditions (etc Resistance-Present) are activated.
"We are Her salvation, and through Her command we shall live forever. I will not die. Not here. Not now. Never!!!"

Offline Undeceived

  • Members
  • *
    • My missions and campaigns
Re: how to active a trigger after another trigger has activated?
« Reply #4 on: 11 Nov 2007, 23:13:09 »
I assume that the feature AND does not work properly for ArmA, can it be?
I mean, it works inherently for me but at the begin of the mission there comes this error saying:

"Type object, expected Bool"

Do I have to do it different in ArmA?


PS:
(Should I better start a new topic at the ArmA-Section in such cases?)
Current project: Black Lands (Arma 3)

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: how to active a trigger after another trigger has activated?
« Reply #5 on: 14 Nov 2007, 12:21:35 »
and works fine, but each of the values needs to be a boolean. I assume that you named one of the triggers trigg2, since this would explain why and would complain about receiving an object (triggers are objects) rather than a boolean value in the condition. Using the variable name "trigger2Enabled" makes it clearer what it actually means. To be correct, you also need to initialise the value of trigger2Enabled in your init.sqs (or init.sqf) as false; in OFP or ArmA, having trigger2Enabled uninitialised (nil) will just make the trigger condition not work at all (it will be neither true or false) until it is defined, but in ArmA II it would raise an error.

Code: (init.sqs/f) [Select]
trigger2Enabled = false;

1st trigger:

cond: whatever
on act: trigger2Enabled=true

2nd trigger:

cond: this and trigger2Enabled
on act: whatever
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)