OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: General Barron on 12 Apr 2005, 01:56:01

Title: Can't get 'list' command to work properly...
Post by: General Barron on 12 Apr 2005, 01:56:01
Hey all! Anyone out there have any experience with the "list" command? It is supposed to return an array of all units that would set off a specific trigger. However, I can't seem to get the darn thing to work!

Here is the deal: when I run the command from a trigger, it works fine. BUT when I use the command from within a script, it returns <null>. ???

I've used the "thislist" command from a trigger's activation field plenty of times, but I'm not sure if I've ever used the "list triggername" command from within a script before. Am I just doing something wrong? Hopefully someone has actually used this from inside a script and can tell me what is going on....

Thanks!

-GB
Title: Re:Can't get 'list' command to work properly...
Post by: Blanco on 12 Apr 2005, 06:03:09
I had the same problem a few weeks ago.
I solved it with a 5 second delay on top of the script.
It seems that it needs some time before the trigger can "catch" the units.
Title: Re:Can't get 'list' command to work properly...
Post by: General Barron on 12 Apr 2005, 07:29:36
Hey thanks Blanco! That did it! Although, I'm using only a 1 second delay... any shorter wouldn't work all the time, but I want to keep it as short as possible. Perhaps I should boot it up to 5 just to be safe?
Title: Re:Can't get 'list' command to work properly...
Post by: Blanco on 12 Apr 2005, 07:48:59
Probably, but I guess it depends on the amount of troops.

Title: Re:Can't get 'list' command to work properly...
Post by: General Barron on 12 Apr 2005, 08:02:36
Alright, thanks for the help!

*solved*