Home   Help Search Login Register  

Author Topic: Deactivating Triggers & Destroyed Objects  (Read 2018 times)

0 Members and 1 Guest are viewing this topic.

ShadowD BOB

  • Guest
Deactivating Triggers & Destroyed Objects
« on: 28 Jul 2003, 03:59:39 »
Firstly is there a way to deactivate a trigger or a group of triggers when another trigger is set off?

Also is there a way to detect buildings being destroyed, e.g  i want a trigger to activate when a radio mast has been destroyed.

Any help will be appreciated.

Kaliyuga

  • Guest
Re:Deactivating Triggers & Destroyed Objects
« Reply #1 on: 28 Jul 2003, 04:56:59 »
 well.. for the destroyed object you can use this method: (if you have Resistance)

Make all the object ID's show on the map

find the number for the building you want to detect being destroyed

make a trigger

condition:   Object ID#  getdammage > .8
activation: whatever you want


you may have you use  Object [ID#]   if the syntax is wrong.. I can never remember the specifics  :P

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Deactivating Triggers & Destroyed Objects
« Reply #2 on: 28 Jul 2003, 06:32:07 »
Use variables to switch triggers on and off.   For example

Condition:    this and var1

If the variable var1 is true and the other condtions are met, the trigger will fire.    If var1 is not true it will not fire, even if the other conditions are met.
Plenty of reviewed ArmA missions for you to play

ShadowD BOB

  • Guest
Re:Deactivating Triggers & Destroyed Objects
« Reply #3 on: 29 Jul 2003, 10:53:34 »
Not sure what i'm doing wrong but i cant get the object trigger to work, its saying the getdammage thing is wrong???

With the variables, i have 3 triggers which go off at the same time, what i want it another trigger that when set off it cancels the 3 other triggers.  What will i need to do here?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Deactivating Triggers & Destroyed Objects
« Reply #4 on: 29 Jul 2003, 11:43:10 »
If you've got an error message, and you don't understand it, post it here exactly and we'll try and figure it out for you.  ;)
Plenty of reviewed ArmA missions for you to play

ShadowD BOB

  • Guest
Re:Deactivating Triggers & Destroyed Objects
« Reply #5 on: 29 Jul 2003, 12:40:40 »
On the object trigger it says "unknown operator getdammage"

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Deactivating Triggers & Destroyed Objects
« Reply #6 on: 29 Jul 2003, 12:49:42 »
Sounds like a syntax problem.    Look up the online official command reference (and the unofficial command ref) and make sure  you fully understand the command.   Make sure you understand the command object too.
Plenty of reviewed ArmA missions for you to play

ShadowD BOB

  • Guest
Re:Deactivating Triggers & Destroyed Objects
« Reply #7 on: 29 Jul 2003, 13:22:24 »
I've looked in the references and found what to put in, used the example and just changed names to fit my mission, i now have

?(GetDammage Obj 70146 > .8);

in the condition field of my trigger, but when i hit ok i get

"invalid number in expression"

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Deactivating Triggers & Destroyed Objects
« Reply #8 on: 29 Jul 2003, 13:38:04 »
You don't need the ? in triggers, that's just for scripts.

I see what you mean about obj, its confusing.    However the command is object

Try

(GetDammage Object 70146) > 0.8
Plenty of reviewed ArmA missions for you to play

ShadowD BOB

  • Guest
Re:Deactivating Triggers & Destroyed Objects
« Reply #9 on: 29 Jul 2003, 16:19:04 »
Working, thx alot m8

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Deactivating Triggers & Destroyed Objects
« Reply #10 on: 29 Jul 2003, 17:21:07 »
as for stopping triggers working when another one is triggered its very simple.... in a untis init field have the line:

allowtrigs1 = true

and in the 3 triggers you want to fire only if the other one hasnt been fired, type in the condition field:

and allowtrigs1 <---- written after this

then in the trigger that fires and stops the others working, type this in the on activation field:

allowtrigs1 = false

so basically what u are doing is making a variable true at the start of the mission, which the 3 triggers need to activate.,.. if the other trigger is activated, then the variable is set false, and the 3 triggers cannot activate because the variable condition is not met

hope that helps :thumbsup:
Proud Member of the Volunteer Commando Battalion

ShadowD BOB

  • Guest
Re:Deactivating Triggers & Destroyed Objects
« Reply #11 on: 29 Jul 2003, 17:21:26 »
Just a little something about deactivating again, i have a trigger which when activated puts an action in the menu for the player, is there a way so that if the player walks out of the trigger the action will be removed from the menu?

Do i have to do something with removeaction and the deactivation field in the trigger??

any help will be appreciated.

gundernak

  • Guest
Re:Deactivating Triggers & Destroyed Objects
« Reply #12 on: 29 Jul 2003, 17:23:13 »
I am not sure what you need, but If you want  a trigger on activation simply turns off 3 another triggers, you have to do:

In the init file of your mission you have to define a variable. Let it call now 'variable01'. You have to define it's state, so type in the init file: 'variable01 = true'.

Next you have to define that the 3 triggers work only when variable = true. So type in all of 3 trigger's condition field: 'this and variable01'

Then you have to type to the on activation field of the other trigger: 'variable01 = false'.

It this case when your trigger activated, it will not let the other 3 triggers work.


ShadowD BOB

  • Guest
Re:Deactivating Triggers & Destroyed Objects
« Reply #13 on: 29 Jul 2003, 18:17:30 »
Cheers guys appreciate the help, that's my alarm system up and running  ;D

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Deactivating Triggers & Destroyed Objects
« Reply #14 on: 30 Jul 2003, 12:49:31 »
Just a little something about deactivating again, i have a trigger which when activated puts an action in the menu for the player, is there a way so that if the player walks out of the trigger the action will be removed from the menu?

Do i have to do something with removeaction and the deactivation field in the trigger??

any help will be appreciated.

when you use the addaction command u must name it as well. The following is written in the on activation field of the trigger.

actionname = player addaction ["action", "script.sqs"]

then to remove the action, write the following in the 'on deactivation' field of the trigger:

player removeaction actionname

:thumbsup:

Proud Member of the Volunteer Commando Battalion