Home   Help Search Login Register  

Author Topic: 3 Side End Trigger  (Read 2372 times)

0 Members and 1 Guest are viewing this topic.

Offline Silgan

  • Members
  • *
3 Side End Trigger
« on: 15 Sep 2006, 09:14:07 »
On the mission I am currently creating I have 3 sides (West, East and Resistance). I was wondering how I can make a trigger(s) that says "West Wins", "East Wins or "Resistance Wins" and ends the mission? I know how to do triggers for a mission where there are only 2 sides but not sure how to do it with 3.
« Last Edit: 15 Sep 2006, 20:37:06 by Silgan »
"If you think you are too small to make a difference, try sleeping with a mosquito."

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re: 3 Side End Trigger
« Reply #1 on: 15 Sep 2006, 09:26:00 »
You should tell more about the conditions to win.

Basically you would put the side of the winner into a string
and then display it may be in a titletext using the format command.

More, when you give us more input.  ;)

~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 JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: 3 Side End Trigger
« Reply #2 on: 15 Sep 2006, 10:56:44 »
Yes, how exactly does the team win?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: 3 Side End Trigger
« Reply #3 on: 15 Sep 2006, 11:44:24 »
Triggers work in exactly the same way no matter how many sides there are.     I suspect you're going to need several triggers, and some variables to communicate information between them.   As the lads say, we need more information.

Welcome to the forum!
Plenty of reviewed ArmA missions for you to play

Offline Silgan

  • Members
  • *
Re: 3 Side End Trigger
« Reply #4 on: 15 Sep 2006, 20:37:28 »
The end triggers are the same for all 3 sides, 1 side wins when the other 2 are dead :P.

Welcome to the forum!

Thanks :D, I used to come on the forum a few years back under the name of Doball. The forum has changed since then :).
« Last Edit: 16 Sep 2006, 19:07:51 by Silgan »
"If you think you are too small to make a difference, try sleeping with a mosquito."

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: 3 Side End Trigger
« Reply #5 on: 15 Sep 2006, 23:38:22 »
Ah, well in that case

Welcome back!

Is this for SP or MP?
Plenty of reviewed ArmA missions for you to play

Offline Silgan

  • Members
  • *
Re: 3 Side End Trigger
« Reply #6 on: 16 Sep 2006, 00:23:18 »
It is a multiplayer mission.
"If you think you are too small to make a difference, try sleeping with a mosquito."

Offline Silgan

  • Members
  • *
Re: 3 Side End Trigger
« Reply #7 on: 26 Sep 2006, 16:43:07 »
Bump! I've been forgotten about :P.
"If you think you are too small to make a difference, try sleeping with a mosquito."

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: 3 Side End Trigger
« Reply #8 on: 26 Sep 2006, 17:02:04 »
Here's a solution involving nine (9) triggers. A little clumsy, but the best i could come up with on short notice. It is untested, and you might want to check the syntax. Consider it to be a rough draft, to give you something to work with...

These triggers checks when a side is wiped out completely:

CONDITION: count units side east == 0
ACTIVATION: eastDead=true

CONDITION: count units side west == 0
ACTIVATION: westDead=true

CONDITION: count units side guer == 0
ACTIVATION: guerDead=true

These triggers decides who won the game

CONDITION: eastDead AND westDead
ACTIVATION: guerWin = true

CONDITION: eastDead AND guerDead
ACTIVATION: westWin = true

CONDITION: westDead AND guerDead
ACTIVATION: eastWin = true

These are the ending triggers. I would replace the hint with title text or something, but you'll get the point...
End1
CONDITION: westWin
ACTIVATION: hint "West Victory"

End2
CONDITION: eastWin
ACTIVATION: hint "East Victory"

End3
CONDITION: guerWin
ACTIVATION: hint "Resistance Victory"

NOTICE: I'm not sure if the side command allows you to count units like that. You might want to put all units on each side into arrays, before you can pass them on to a script/trigger like that. Check the COMREF
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: 3 Side End Trigger
« Reply #9 on: 26 Sep 2006, 17:42:52 »
IIRC count units can result in a delay of up to several minutes before the trigger fires.   (Although that may only be with groups ...)   Use

"alive _x" count units ...

for an instant response.   You can put a delay of a few seconds in one of triggers if you want.
Plenty of reviewed ArmA missions for you to play

Offline Silgan

  • Members
  • *
Re: 3 Side End Trigger
« Reply #10 on: 04 Oct 2006, 15:06:36 »
Here's a solution involving nine (9) triggers. A little clumsy, but the best i could come up with on short notice. It is untested, and you might want to check the syntax. Consider it to be a rough draft, to give you something to work with...

These triggers checks when a side is wiped out completely:

CONDITION: count units side east == 0
ACTIVATION: eastDead=true

CONDITION: count units side west == 0
ACTIVATION: westDead=true

CONDITION: count units side guer == 0
ACTIVATION: guerDead=true

These triggers decides who won the game

CONDITION: eastDead AND westDead
ACTIVATION: guerWin = true

CONDITION: eastDead AND guerDead
ACTIVATION: westWin = true

CONDITION: westDead AND guerDead
ACTIVATION: eastWin = true

These are the ending triggers. I would replace the hint with title text or something, but you'll get the point...
End1
CONDITION: westWin
ACTIVATION: hint "West Victory"

End2
CONDITION: eastWin
ACTIVATION: hint "East Victory"

End3
CONDITION: guerWin
ACTIVATION: hint "Resistance Victory"

NOTICE: I'm not sure if the side command allows you to count units like that. You might want to put all units on each side into arrays, before you can pass them on to a script/trigger like that. Check the COMREF

Sorry its been a while I've been quite busy. Anyway I've set the triggers up how you've said above except I used Macguba's "Alive_X" instead of just count units.

"alive_x" count units side west == 0
"alive_x" count units side east == 0
"alive_x" count units side guer == 0

Sadly it didn't work. It throws back the above conditions because of the "side [side]" part. So I changed it to:

"alive_x" count units sidewest == 0
"alive_x" count units sideeast == 0
"alive_x" count units sideguer == 0

But that didn't work either. It's those 3 triggers that I think are stopping the end triggers working and I'm not sure how to make them work :(. I've attached the .sqm so you can see what I've done.
"If you think you are too small to make a difference, try sleeping with a mosquito."

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: 3 Side End Trigger
« Reply #11 on: 04 Oct 2006, 15:23:48 »
Quote
"alive_x" count units side west == 0

These lines should begin:

"alive _x" count units...............

There should be a space between 'alive' and '_x'


Anyway.....I'll have a look at your sqm and see what I can see.

EDIT:

I can't see these lines working ......the side command only works on an Object or Group.
It will return the side that the Object or Group belongs to.

However all the units on a particular side are not necessarily in the same group.

When you changed it to sidewest, sideeast and sideguer,  there was no longer any error message because the syntax is then correct, except there are no groups called sidewest, sideeast and sideguer.

There must be another way of doing this, maybe just using the list from a trigger for each side.

EDIT2:
The attached edited mission seems to work.....whether it is what you wanted is another matter   :P



Planck
« Last Edit: 04 Oct 2006, 16:29:18 by Planck »
I know a little about a lot, and a lot about a little.

Offline Silgan

  • Members
  • *
Re: 3 Side End Trigger
« Reply #12 on: 04 Oct 2006, 22:36:28 »
Quote
"alive_x" count units side west == 0

These lines should begin:

"alive _x" count units...............

There should be a space between 'alive' and '_x'


Anyway.....I'll have a look at your sqm and see what I can see.

EDIT:

I can't see these lines working ......the side command only works on an Object or Group.
It will return the side that the Object or Group belongs to.

However all the units on a particular side are not necessarily in the same group.

When you changed it to sidewest, sideeast and sideguer,  there was no longer any error message because the syntax is then correct, except there are no groups called sidewest, sideeast and sideguer.

There must be another way of doing this, maybe just using the list from a trigger for each side.

EDIT2:
The attached edited mission seems to work.....whether it is what you wanted is another matter   :P



Planck

The edited mission you attached was exactly what I wanted. Funnily enough I was going to try using the "Present" part of the "[Side] Alive?" triggers but didn't in the end and posted my problem here :P. Anyway thanks for all your help guys :).
"If you think you are too small to make a difference, try sleeping with a mosquito."