Home   Help Search Login Register  

Author Topic: [SOLVED] Repeating trigger doesn't repeat  (Read 5147 times)

0 Members and 1 Guest are viewing this topic.

Offline Inkompetent

  • Members
  • *
[SOLVED] Repeating trigger doesn't repeat
« on: 25 Jun 2009, 17:11:42 »
Hallo there!

Got a lil' problem with a trigger that is supposed to continously count how many OPFOR are left on the map.

At the moment I have an 'East Present' repeating trigger covering the mission area, that is to count people with a simple 'eastCount = east countSide thisList' line.

However when running the mission I got issues, and debugging messages in sideChat shows it only fires once at the start of the mission, and that's it. I've tried with the condition for activation being 'this', 'true', 'east countSide thisList > 6', but nothing of them makes it trigger more than once.

Anyone that can shed some light on what I'm doing wron?
« Last Edit: 26 Jun 2009, 11:43:10 by Inkompetent »

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Repeating trigger doesn't repeat
« Reply #1 on: 25 Jun 2009, 17:23:42 »
A trigger only triggers when the condition changes to true. The key word here is change.

The condition changes to true from start since all units are present. The only way to make it do another count is if all eastern units leave the trigger area (condition changes to false) and enters it again (changes back to true once more)

The same goes for your > 6 solution. Either there's more than six units present in the list or not. The condition can only be met once, unless all east sided units leave the trigger area and then returns.

SWEDISH NOTE: Jag kan tänka ut en fungerande lösning åt dig om du vill, men oftast är det ju roligare att hitta lösningarna själv  ;)
« Last Edit: 25 Jun 2009, 17:30:01 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Repeating trigger doesn't repeat
« Reply #2 on: 25 Jun 2009, 17:49:54 »
This caught me out a little earlier today... as using "true" as a condition used to allow indefinite repeating (or is my memory just foggy?).  Either way, this is a sensible improvement... albeit one that puzzled me for a little while today!

Offline Inkompetent

  • Members
  • *
Re: Repeating trigger doesn't repeat
« Reply #3 on: 25 Jun 2009, 18:41:58 »
Okay. As far as I recalled this, or some form of it, have worked before.

I guess that it comes down to by a looping script create and delete triggers doing the above if I really have to do it that way. I think I'll have easier workarounds for my current mission though, but good to know non the less.

Offline F2kSel

  • Members
  • *
Re: Repeating trigger doesn't repeat
« Reply #4 on: 26 Jun 2009, 01:42:18 »
I place a game logic and in the init field set a variable, lets say trig=true


in a trigger set the following

Condition  trig
on Act     trig=false
on Dea     trig=true

you still need to set the trigger to repeat aswell.


That's how I do it if I don't want to script it, assuming I understand the question.
« Last Edit: 26 Jun 2009, 01:53:17 by F2kSel »

Offline Sparticus76

  • Members
  • *
Re: Repeating trigger doesn't repeat
« Reply #5 on: 26 Jun 2009, 03:06:16 »
I had a similar problem.
I made one trigger like yours and then made another with a counter.

Create a logic object and put in init line....TriggerLister = false.

- create a repeating trigger initiates by.. !TriggerLister. On activation..TriggerLister = true..count down 10 seconds or whatever in your min, med and max.

- create a second repeating trigger initiated by (east present and TriggerLister).
- on activation, get the triggers list and TriggerLister = false.

Have tested it and it works.

Offline Inkompetent

  • Members
  • *
Re: Repeating trigger doesn't repeat
« Reply #6 on: 26 Jun 2009, 11:40:47 »
Ahhh, thanks for the solutions, both of ya! Typical me to make things more advanced than they have to be.

Edit: Tried the solution given by Sparticus76, and the mission now works like a charm. Wonderful!
« Last Edit: 26 Jun 2009, 18:28:59 by Inkompetent »