Home   Help Search Login Register  

Author Topic: Switch trigger problem  (Read 1401 times)

0 Members and 1 Guest are viewing this topic.

Gooner861

  • Guest
Switch trigger problem
« on: 14 Jun 2004, 21:27:12 »
Ok picture the scenario, ur on a nice easy patrol with ur unit than suddenly ur leader is taken out by a sniper.

I have a switch trigger with this in its condition field: NOT (alive unit1)

I then have this synched to the first waypoint of move. Hopefully than they shud automatically move onto the other waypoint in a forest that i have set so that we have cover.

But when unit1 is taken out, all my guys do is carry on runnin to the first "move" waypoint i set.

Switch triggers normally work for me EXCEPT this time  >:( .

Thanks  :)

Gooner

Offline Blanco

  • Former Staff
  • ****
Re:Switch trigger problem
« Reply #1 on: 14 Jun 2004, 21:44:54 »
How did you set up that patrol?

With a few move waypoints and a cycle wp I guess...

Try to sync every move wp + cycle wp with that switch trigger.
They probably continue the patrol to the wp you've syncronised.Once they arrive on a sync wp they break the patrol and move on to the wp in the forest.




Search or search or search before you ask.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Switch trigger problem
« Reply #2 on: 14 Jun 2004, 21:51:06 »
Nah - you need to syncronise the switch trigger with the
cycle wayopint - and the next wayoint after the cycle one
should be the waypoint, where you want to send them once
unit1 is down.


wp1 - move

wp2 - move

wp3 - move

wp4 - cycle - closest to wp1 (if you want to make the cycle from wp1 to wp4) -  syncronised with the switch trigger

wp5 - in the woods

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Gooner861

  • Guest
Re:Switch trigger problem
« Reply #3 on: 14 Jun 2004, 22:41:56 »
This is wot all the waypoints will look like.

Get In - Get in truck

Get out

Move  - Midway through this unit 1 is shot, than i want the rest of the group to go to forest.

Move to forest

So u see there aint any cycle wp to synch up wit the switch trigger. So wot wud i synch up wit the switch?

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Switch trigger problem
« Reply #4 on: 14 Jun 2004, 22:52:15 »
OK, maybe i should explain then how the switch trigger is
supposed to work;

A switch trigger syncronised to a waypoint will force a group/unit to head imidiately to the waypoint after the one,
where it's syncronised to.

This means you need to syncronise the switch trigger to the previous wayopint of the one, where you want to send your
units into the forrest.

This would then be your last move waypoint, where midway
their group's leader gets shot.
:edit - btw - i meant your last waypoint before the one where
you send them into the forrest.

hope this helps

~S~ CD
« Last Edit: 14 Jun 2004, 22:53:24 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Gooner861

  • Guest
Re:Switch trigger problem
« Reply #5 on: 16 Jun 2004, 21:13:09 »
Still abit weird. I synched the trigger that has NOT (Alive unit) to the 2nd to last as u said but this time there is a new leadr assigned and the units just lay there gettin picked off by the sniper.  :(

Cheers in advance.

Gooner.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Switch trigger problem
« Reply #6 on: 17 Jun 2004, 00:53:02 »
Hello Gooner861!

I am no scripter (and posting from work so I have none of my reference material in front of me), but is it not !alive unit instead of "NOT (Alive unit)"?

                                                         Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Switch trigger problem
« Reply #7 on: 17 Jun 2004, 01:16:06 »
@Wadman;

!alive unit OR not alive unit

are both the same  ;)

! = not and means the contrary of YES  ;D

@Gooner861

The new assigned leader is nothing weird, as ofp's groups
do always get assigned to a new leader (highest ranking
unit of the group or the next member in the row if all are of
the same rank).

The units just laying there to get picked off by the sniper may
be caused by the waypoints settings (the one in the forrest).

Behaviour: STEALTH/COMBAT will make them do that - while
even AWARE or SAFE would cause the same effect in case of
a sniper swinging his rifle around is in the near.

I would suggest you type the following code into the switch
trigger's onActivation field to prevent this effect:

"_x setunitpos {UP}" forEach units groupname

And at the waypoint in the forrest you can use it's onActivation
field to reset it:

"_x setunitpos {AUTO}" forEach units groupname

:note - this will only work for a non-obsolete waypoint, like
a move waypoint. If it is a guard/hold waypoint in the
woods there, then the onActivation field won't become executed
once the group arrived there. A move wayopint will still execute
the onAct field, even if it's the last waypoint of a group.

Also note that you should not use the onActivation field of the
waypoint, which you have syncronized to the switch trigger,
as it will never become executed.

onActivation field is waiting to be executed on the switch trigger

switch trigger gets triggered

group will be forced to the next waypoint after the syncronisation - and therefore onActivation field of syncronized
waypoint becomse ineffective.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Switch trigger problem
« Reply #8 on: 17 Jun 2004, 01:16:39 »
!alive unit

and

not (alive unit)

should be the same.   not = NOT = !

It sounds as if the trigger is working (use a hint in the On activation line to check) but your boys are going to ground because they are under fire.    Maybe the next WP should have speed fast, or a fancy setbehaviour or something to get them there.   Just a thought.
Plenty of reviewed ArmA missions for you to play

Gooner861

  • Guest
Re:Switch trigger problem
« Reply #9 on: 17 Jun 2004, 15:35:28 »
Ok i think it works its still a little weird though.

Ok so the leader shot   - Works

But the waypoint into the forest is still a little dodgy. They dont staright away go into the forest, they linger in the same position for about a minute lying o the ground. Then after a minute they get up an move towrds the forest but than kinda flank the sniper and move on. They dnt stay in the forest!!!!!!!!!!!!!!!!!!!  

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Switch trigger problem
« Reply #10 on: 17 Jun 2004, 16:34:19 »
Well, don't forget the AI in this game is very sophisticated:  if they think there's a threat somewhere they will move in a manner to deal with it.    It is very hard to make an AI loon behave mechanistically when there are enemies around.    

If its important, try moving the waypoint a little:  small moves can sometimes make a surprisingly large difference.   Alternatively, give them another waypoint further on.    The last waypoint for a group should never be MOVE or SEEK&DESTROY.     Good waypoints for endings are HOLD, CYCLE or GUARD.
Plenty of reviewed ArmA missions for you to play

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Switch trigger problem
« Reply #11 on: 17 Jun 2004, 16:38:34 »
Or you could also change the sniper into a captive.

this setcaptive true

in his init field.

Now he will still shoot the leader, but nobody will try to attack him
anymore.

Once need, just use: snipername setcaptive false
somewhere and somewhen else.

:edit - btw - Macca;

hold/guard wouldn't be any better in that case, as with both
waypoints the group would still engage targets or positions
worth to be engaged.

With move waypoint as last waypoint i can't see any problems -
remember: you can still use switch triggers to (re)activate previous
waypoints or further more - previous wayopints, which were being
skipped before by other switch triggers.

~S~ CD
« Last Edit: 17 Jun 2004, 16:41:42 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Switch trigger problem
« Reply #12 on: 17 Jun 2004, 16:52:34 »
macguba says:

Quote
!alive unit

and

not (alive unit)

should be the same.

and CD says:

Quote
!alive unit OR not alive unit

are both the same

Whereas I  said:

Quote
!alive unit instead of "NOT (Alive unit)"

Does "!alive unit" = "not alive unit" = "not (alive unit)"? Bottom line, are the brackets needed? Just trying to educate myself a little bit here. Thanks!

                                                   Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Switch trigger problem
« Reply #13 on: 17 Jun 2004, 18:22:51 »
I would think in this case brackets would not be needed.   You could make a small test mission to check.

However I often use brackets where they are not strictly necessary because it makes debugging easier.

On the WP question, yes, the group would still engage the sniper whatever the WP.   setCaptive is a good idea here.   I dislike move as a final WP because the group tend to stand around looking stupid:   with hold they still stand around looking stupid (which is why I almost always use cycle preceded by move or S&D) but it gives them more tactical flexibility.    
Plenty of reviewed ArmA missions for you to play

Gooner861

  • Guest
Re:Switch trigger problem
« Reply #14 on: 17 Jun 2004, 21:50:24 »
Still weird, i tryed wot u said and still they seem on wanting to run towards the sniper. Anyway i've just decided to make the player the leader once the first leader has been killed so that they can find cover and then join up with another squad.

Thanks for the help though.  ;D

Dubieman

  • Guest
Re:Switch trigger problem
« Reply #15 on: 17 Jun 2004, 22:32:50 »
Well I want to get into switch triggers so I read armsty's tut on it and went to download the mission and its in .html file...? Anyways I tried getting it into my ofp but no luck. Anyone got a simple switch trigger .sqm they can post so I can understand it via example? :P ;)

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Switch trigger problem
« Reply #16 on: 17 Jun 2004, 23:50:25 »
hmm - everything important about switch triggers you
can read in this thread here Roach  ;)

Gonna sum it up again for you:

Quote
A switch trigger syncronised to a waypoint will force a group/unit to head imidiately to the waypoint after the one,
where it's syncronised to.

This means the group will head to the next waypoint after
the syncronized waypoint, ignoring any other wayoints inbetween their actual position and the switch trigger's
syncronisation line.

Short example:

waypoint 1: move

waypoint 2: move

waypoint 3: move        -    syncronised to a switch trigger

waypoint 4: move

OK, let's say the group is currently walking from their starting
position to waypoint 1. Suddenly the switch trigger gets
triggered - the group will now imidiately head over to waypoint
4 (ignoring waypoint 2 and 3).

One more example to show you another possibility:

waypoint 1: move - syncronised to switch trigger A

waypoint 2: move

waypoint 3: move

waypoint 4: move - syncronised to switch trigger B

waypoint 5: move

waypoint 6: move

waypoint 7: cycle - so that it's close to waypoint 5

OK, this time the group would just walk to waypoint 1 to wait
there until switch trigger A gets triggered - we don't want
that, because we want them to start with their patrol.
Therefore we find a way to activate switch trigger B  ;)
Group will imidiately walk to waypoint 5 - once arrived they
turn over to waypoint 6, and upon the cycle waypoint they
will move wp5 <----> wp6 (ya know: a simple patrol).

Now we activate switch trigger A, and the group will move
to waypoint 2, as trigger A was syncronised with waypoint 1.

Off course you can use multiple activatable triggers too, for
getting able to let groups use waypoints series for different
situations more than once. Just make sure that you somehow
make repeating triggers become inactive, once they got
activated. You could use boolean conditions like: gogo1 etc. for
that instead of side/present. And in a normal side/present
trigger you say then: gogo1 = true.
In the switch trigger's onActivation field (the one which is waiting for gogo1), simply say then: gogo1 = false.

The trigger will cut the condition off, once it got activated.

That way the switch trigger will everytime send the guys to the
next waypoint after it's syncronisation, when you say:
gogo1 = true.

And one more thing to add:

there are some waypoints in ofp, which will never end (obsolete
waypoints) - these are:

hold / guard / support

If you want to make a group move to any other waypoint, after
they arrived at one of these two above, you'll need a switch trigger too to force them to somewhere else.

hope this was easy enuff to understand

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Dubieman

  • Guest
Re:Switch trigger problem
« Reply #17 on: 18 Jun 2004, 03:08:19 »
Yeah I pretty much understand now. I can't test it since my HD (145gb) just got erased via virus. Now I'm on my backup 40gber. No OFP for a few days. I'll probably pick a new HD up tomorrow. (I can't put OFP on my 40gb since all my important system files are on there and there is no room) :(

There is some stuff in there that I didn't know about. Thanks. :P ;)
« Last Edit: 18 Jun 2004, 03:10:21 by GuiltyRoachKilla »