Home   Help Search Login Register  

Author Topic: Triggers...I think  (Read 581 times)

0 Members and 1 Guest are viewing this topic.

Judge856

  • Guest
Triggers...I think
« on: 16 Apr 2003, 03:06:07 »
How do I make a trigger/or whatever its supposed to be to say

If east is present and west is present do nothing

but

if west is present and east is not present then display message "A town has been taken"

And if it's possible, to display it on the GPS as "West town" or "Under West control" or something like that.

As for ...this and west countside thislist < 1... in the activation of the trigger it says "Type Bool, expected nothing"

BHD Mod

  • Guest
Re:Triggers...I think
« Reply #1 on: 16 Apr 2003, 04:45:30 »
that seems pretty complicated but i'm sure an editing master on this site could figure it out

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Triggers...I think
« Reply #2 on: 16 Apr 2003, 10:42:46 »
You can't.

But you can easily do it with two triggers.   Assuming east start in the trigger area and have to be removed by west:-

Activation box:  east not present
On activation:   eastGone=true

Activation box:   west present
Condition:   this and eastGone
On Activation:    hint "A town has been taken."


I don't know anything about the GPS


thislist only contains units that fired the trigger ... so if the trigger is east present, there will be only east units in this list.    What you could do is use a trigger anybody present, and use your countside thing on that.   Check the syntax in the Command Ref, and trying putting a few brackets in - that sometimes helps.

Edit:  and yes, its triggers.   It's always triggers.
« Last Edit: 16 Apr 2003, 10:44:17 by macguba »
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:Triggers...I think
« Reply #3 on: 16 Apr 2003, 11:28:47 »
1.
If I read you right, you don't need a trigger which detects if both east and west are present, because as you stated, there's not action needed when the case is this.

2.
A trigger which detects if east is not present and if west is present.

Make a new trigger
Select activation to Repeatedly and by West Present
Type in the condition field (east countside thislist < 1) and this
Type in the on activation field tittletext ["A town has been taken",plain down]

3.
As for the GPS thing.. You mean like a marker on the map would first say "East town" and after it's in West control it would change to "West town" on the map?

Assuming that's what you ment, no. At least I don't know how you can change the text fied of a marker afterwards, but what you can do is hide and reveal markers (I think).

4.
Create 2 markers in the town. 1st one should be color red, size 1 and have text that says "East Town". 2nd one should be color green, size 0 and have text that says "West Town".
Name the 1st marker as eastmrk and the second one westmrk. Don't be afraid because the west marker won't show up on the map. It's because you set the size of it to 0 which is what you want to do.

Now, in the same trigger which detects when east is not present and when west is present type this in the on activation field
tittletext ["A town has been taken",plain down]; "eastmrk" setmarkersize [0,0]; "westmrk" setmarkersize [1,1]

What this should do is hide the marker which says the town is east and unhide the marker which says it's a west town at the minute the trigger detects there's no more east, but there is west. I don't have an opportunity to test the syntaxes now but I imagine it could even work.


Along comes another problem. What is West leaves the town so that there's no west nor east present? What sould happen then?
If you want the town to become neutral then, you need yet another marker and you need to fiddle with the on deactivation field of the trigger.
« Last Edit: 16 Apr 2003, 12:05:23 by Artak »
Not all is lost.