Home   Help Search Login Register  

Author Topic: Left Base  (Read 852 times)

0 Members and 1 Guest are viewing this topic.

Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Left Base
« on: 19 Mar 2003, 17:31:22 »
I am looking how to programme a trigger so that when one of 3 helicopters leaves the base, the trigger is activated.

I cannot group the trigger to the choppers because they are not in the same group.

Any suggestions?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Left Base
« Reply #1 on: 19 Mar 2003, 17:34:02 »
Make the trigger activated by a variable.

Now create 3 triggers with the same area, one for each heli/group.     If any of them are fired (heli not present) the variable is set to true.

It's not elegant, but it will work.
Plenty of reviewed ArmA missions for you to play

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Left Base
« Reply #2 on: 19 Mar 2003, 17:53:15 »
or you could push your luch and try to make a trigger and put in it's conditon field

!(heli1 && heli2 && heli3) in thislist

syntax is propably not right
Not all is lost.

Uberminch

  • Guest
Re:Left Base
« Reply #3 on: 19 Mar 2003, 17:55:28 »
Go with macgubas. So what if it's not elegant, I thrive on finding corse solutions for my editing rpoblems. Why bother with a script, I say.  :D

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Left Base
« Reply #4 on: 19 Mar 2003, 18:05:09 »
Only one reason Uberminch. Scripts cause less lag when done right, than triggers.

Putting in 3-4 triggers to do something which you could accomplish with just one, but won't because you're too lazy to find out how to do it is just bad editing  ;)
(no offence macguba  ;D)
Not all is lost.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Left Base
« Reply #5 on: 19 Mar 2003, 18:09:54 »
Artak is right, triggers cause lag and make the Mission Editor map harder to comprehend.     If it were me I'd probably go with your solution.    No offence Uberminch!   :)
Plenty of reviewed ArmA missions for you to play

Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Re:Left Base
« Reply #6 on: 21 Mar 2003, 21:10:39 »
There is one flaw in all of this:

If one of the choppers blows up, it counts as it being not present and the trigger is activated.

Any way round this bug?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Left Base
« Reply #7 on: 21 Mar 2003, 21:18:01 »
(alive heli1 and not (heli1 in thislist)) and (alive heli2 .... etc

or something.... play with the syntax
Plenty of reviewed ArmA missions for you to play

Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Re:Left Base
« Reply #8 on: 21 Mar 2003, 21:32:52 »
Sounds tricky, but I'll give it a shot.

Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Re:Left Base
« Reply #9 on: 22 Mar 2003, 09:45:12 »
I've got it to work, thanks.

I have another question though.  After the player (in his commanche) destroys the hinds, he is supposed to assist the M1A1s taking the Russian Camp (T80s, Shikas).  Any ideas how to make the M1A1s retreat if they are heavily outnumbered, and advance if the Commanche has done a good job in clearing the path?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Left Base
« Reply #10 on: 22 Mar 2003, 12:08:55 »
Hey  8) it works.   Well done.

You can make the M1A1s do anything you like.     All you need are some switch triggers.    If you're not sure how to use them search the forum (switch + trigger) I seem to explain it practically every day.
Plenty of reviewed ArmA missions for you to play

Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Re:Left Base
« Reply #11 on: 22 Mar 2003, 13:41:16 »
I've tried creating a script:

Code: [Select]
# again
? west countside group tankgb < 5 and west countside group tanggb2 < 5: goto lessthan
? east countside group t80s1 < 4 and east countside group t80s2 < 4: goto enemy

goto "again"
# lessthan
leader tankgb sidechat "We're encountering heavy resistance.  All units

retreat"
~1
player sidechat "Roger that."
retreat = true
exit

# enemy
advance = true
"3" objstatus "DONE"
leader sidechat "I think we're winning."
~1
player sidechat "Yes, they are retreating now."

2 bugs:

The countside conditions do not work - any advice?

I need to be able to make the M1A1 groups abandon their waypoints and retreat if they are outnumbered.
« Last Edit: 22 Mar 2003, 13:42:15 by angusjm »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Left Base
« Reply #12 on: 22 Mar 2003, 17:04:04 »
Don't use countside, just use count

count units tankgb < 5       (I think .... check it!  that willcount the crew, not the vehicles)

suspected typo - is it tanggb2 < 5  or should it be tankgb2 < 5 ??

goto "lessthan" etc    (you need " ")

you need a delay ~1 in the again loop.   All loops must have a delay.

Try:-
? ((count units tankgb)+(count units tankgb2)) > ((count units t80s1) + (count units t80s2)): goto "advance"
Plenty of reviewed ArmA missions for you to play

Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Re:Left Base
« Reply #13 on: 22 Mar 2003, 18:44:44 »
Thanks, that's helped.  I used move commands instead of waypoints.  Here's my finished script in case you are interested:

Code: [Select]
# again
? count units tankgb < 5 and count units tankgb2 < 5: goto "lessthan"
? count units t80s1 < 4 and count units t80s2 < 4: goto "enemy"
~1
goto "again"
# lessthan
leader tankgb sidechat "We're encountering heavy resistance.  All units retreat"
~1
player sidechat "Roger that."
tankgb move getpos rpoint
tankgb2 move getpos rpoint
retreat = true
"3" objstatus "FAILED"
exit

# enemy
advance = true
"3" objstatus "DONE"
leader tankgb sidechat "I think we're winning."
~1
player sidechat "Yes, they are retreating now."
t80s1 move getpos rpoint2
t80s2 move getpos rpoint2
t80s3 move getpos rpoint2
tankgb move getpos hold
tankgb2 move getpos hold