OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Case on 14 Jun 2007, 19:59:26

Title: Long delay on Trigger firing containing 'count units'
Post by: Case on 14 Jun 2007, 19:59:26
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!
Title: Re: Long delay on Trigger firing containing 'count units'
Post by: h- 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..
Title: Re: Long delay on Trigger firing containing 'count units'
Post by: Case 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!
Title: Re: Long delay on Trigger firing containing 'count units'
Post by: h- 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  ::)