Home   Help Search Login Register  

Author Topic: Trigger toggling  (Read 525 times)

0 Members and 1 Guest are viewing this topic.

shadow99

  • Guest
Trigger toggling
« on: 22 Jun 2004, 08:20:15 »
Hi, I don't know if any of you remember me, but, after finishing another project I'm back to OFP editing again. :)

I've caught up on some turtorials but I can't find a simple method to turn a trigger on or off.

Let's see. I put a trigger down, name it 'trig1' and set  the activation field to not... hang on, I just though of something.

Nope, didn't work.

Anyway, to make a simple situation:

I design a trigger (of any kind), and set the activation to  'Not present'. I name this trigger 'trig1'. Now, on somebody's waypoint, in the activation field, I put 'trig1= true'. Should, work right?

I wish things were that easy.    :-[

What I basically want, is for a waypoint, to be able to turn 'on' any kind of trigger, (that is, making its effects take place) on the spot, immediately. I'm sure there is a simple way to do this.

CrashnBurn

  • Guest
Re:Trigger toggling
« Reply #1 on: 22 Jun 2004, 08:35:57 »
One of the commandments of OFP editing is to NEVER use a waypoint to trigger anything. It is simply unreliable and players in veteran mode won't see waypoints and may not activate them.

Now, one of the good things about OFP editing is that there are usually several ways to accomplish a task. Best if you find another way to do your thing. If you elaborate in some detail what you want, I'm sure you'll get lots of feedback here.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Trigger toggling
« Reply #2 on: 22 Jun 2004, 10:26:04 »
You're half right.    The name of the trigger is just that - a name - but you're confusing it with a variable.   This is what you need.

Trigger
Activation box:  east present
On Activation:   trig1=true

Waypoint
Condition:  trig1

You can use variables to turn triggers on and off.   For example, a trigger that appears elsewhere in the same mission might be

Activation box:   west present
Condition:  this and trig1

To make a waypoint turn on a trigger you might have this

Waypoint
On activation:  WP1=true

Trigger
Activation box: whatever
Condition:   this and WP1

There is a trick with variables:  if the game meets an undefined variable, it will treat the whole expression as false.   Consequently it is sometimes necessary to initialise variables in your init.sqs (or elsewhere)

trig1=false
WP1=false

Then you can use a line in a trigger like this

Condition:   this and (not trig1)

If the variable was not initialised then this trigger would never fire.    (trig1 would be undefined and the whole expression would be false:  then trig1 would be set to true which prevents the trigger from firing.)    Read all that again and hopefully it will make sense.

Crashnburn is quite right about player waypoints.   It doesn't always apply to AI led waypoints, though you do have to be careful sometimes.   For example, what happens if the group in question is wiped out before it gets to the waypoint?
Plenty of reviewed ArmA missions for you to play

shadow99

  • Guest
Re:Trigger toggling
« Reply #3 on: 22 Jun 2004, 11:46:24 »
Oh yeah. I mean, I've always known Waypoints are never accurate for activating triggers unless under controlled circumstances. For one, I would never use a player waypoint to activate a trigger, and for two, this trigger I want activated is at the very start where there are NO enemies around and the course set is very basic, and always the same. Thanks for the help, both of you.

I suppose I can use that same method for trigger-to-trigger activating.

Oh, and I've run into a problem with cycling. The way I see it, I just use it when I don't want something to happen until the 'switch' in question is activated. But sometimes it does in fact, actually cycle, as its name implies. How do stop a cycle from cycling and make it only able to prevent course to the next waypoint?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Trigger toggling
« Reply #4 on: 22 Jun 2004, 15:34:12 »
Yes indeed, you can use this trick from trigger to trigger, or script to trigger - whatever you like.

Only use a cycle waypoint when you actually want the loons to do it again.  If you just want them to wait somewhere till a switch trigger fires the best waypoint is usually hold.   This is never completed - the only way to get a group out of it is to use a switch trigger.  Alternatively, give them a seek and destroy immediately before (and adjacent to) the cycle one:  they will cycle the S&D until the trigger moves them on.
Plenty of reviewed ArmA missions for you to play

shadow99

  • Guest
Re:Trigger toggling
« Reply #5 on: 23 Jun 2004, 06:12:58 »
Hmmm... that's a few interesting points. Thanks macguba, I always wanted to know what 'Hold' did. In fact, I really need to read a turtorial explaining waypoints in detail. I might go and look now...

shadow99

  • Guest
Re:Trigger toggling
« Reply #6 on: 23 Jun 2004, 07:05:21 »
Argh. As soon as I fix one problem I run into another. Although, it is a question that has been nibbling at me for quite some time.

When I set a waypoint for a group's leader, I want him to do exactly as the waypoint tells him, and not stick around all suicide-like and try and destroy three Russian Pauk-Class Frigates with an M16 at a range of 1000 feet. I want him to move STRAIGHT to the extraction point without further or do.

I know of one way to do this... I think, and that would be to have in stand down, etc., in the waypoint's specifications, but that would stupid. Is there a way to get my leader STRAIGHT to a waypoint, with no attacking, or any other action that interferes with getting to the waypoint?

Dubieman

  • Guest
Re:Trigger toggling
« Reply #7 on: 23 Jun 2004, 16:00:33 »
I've never ran into  a problem with soldiers tryin to kill an LST with an M16 or LAW before, but I've never seen a pauk class frigate.

It depends what you do.  You could set the last waypoint or the evac one as hold fire, engage at will or open fire. Experiment with it. If there are no more enemy troops and the ships are the only obstacles then set the ai to hold fire. The only other solution I can think of is making those ships empty, usually enemy vehicles don't get shot at unless they are crewed. :P

shadow99

  • Guest
Re:Trigger toggling
« Reply #8 on: 24 Jun 2004, 05:56:45 »
Experiment. That's actually probably the best solution. I guess an Evac waypoint will work to. Anyway, I'm going to try it all out now. Thanks a bunch.