Home   Help Search Login Register  

Author Topic: Long delay on Trigger firing containing 'count units'  (Read 1195 times)

0 Members and 1 Guest are viewing this topic.

Offline Case

  • Members
  • *
I have a trigger with the following condition:

Code: [Select]
(damage er_bmp1 > 0.8) && (count units er_grp1 < 4) && (count units er_grp2 < 4) && (count units er_grp3 < 4)

It's activation is to set an objective complete.

It works, but it takes a long time to fire after the conditions are met.  For testing, I created a 'kill script' that i fire and it destroys everything here.

It takes nearly 5 minutes for the trigger to activate.

Any ideas?

Thanks!
« Last Edit: 14 Jun 2007, 20:02:14 by Case »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Long delay on Trigger firing containing 'count units'
« Reply #1 on: 14 Jun 2007, 20:42:23 »
Change your code into this
Code: [Select]
(damage er_bmp1 > 0.8) && ({alive _x} count units er_grp1< 4) && ({alive _x} count units er_grp2< 4) && ({alive _x} count units er_grp3< 4)
The trigger should 'fire' immediately..


It seems that for some reason the group's unit count doesn't get affected by the fact that the units die until some time has passed..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Case

  • Members
  • *
Re: Long delay on Trigger firing containing 'count units'
« Reply #2 on: 14 Jun 2007, 20:54:09 »
Ok, that worked perfectly.

Thanks a lot h-

Sorry I didn't find that behaviour of 'count units' in my searches.

Also, I just wanted to take a minute and thank this community.  This should be the last part of my mission working.  I just need to do some minor gear tweaking and code cleanup.

It has been amazing what I have learned, just from this message forum, and the downloadable tutorial and script samples.

This will be my first ever mission, and I am pretty happy with it, due in most part to this community!

Cheers!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Long delay on Trigger firing containing 'count units'
« Reply #3 on: 15 Jun 2007, 10:58:21 »
Quote
Sorry I didn't find that behaviour of 'count units' in my searches.
I haven't done any extensive studying on the matter, it just seems to be so..

And it's not the count units part, it's the units group..
Someone with real OOP programming experience could probably shed some light on this, maybe the group object (not 3D) properties are not updated in real time or something.. :dunno:

But what do I know, I can hardly program the timer on a DVD Recorder  :D  ::)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.