Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Problem with Bremmer's Improved AI script  (Read 1987 times)

0 Members and 1 Guest are viewing this topic.

Offline Inkompetent

  • Members
  • *
Problem with Bremmer's Improved AI script
« on: 31 Jul 2007, 22:11:39 »
Hello again!

This time I've got some trouble with the above script. Namely a bug in the sound detection part of the game.

I get an error at ? ("_unit knowsabout _x > 0.10" count _enemy > 0) : goto "spotted" where it complains at that the data type is a Group and not an Object.

I have manually initialized arrays of groups in the init.sqs file as follows, and wonders if that could be a problem...

;; setup ai.sqs
aieast = [cityPat1,roadPat1,roadPat2];
aiwest = [pgroup];
[cityPat1,[],[],[],[roadPat2],flaring,tactical] exec "ai.sqs";
[roadPat1,[],[],[],[],flaring,tactical] exec "ai.sqs";
[roadPat2,[],[],[],[roadPat1],flaring,tactical] exec "ai.sqs";
[pgroup,[],[],[],[],flaring,tactical] exec "ai.sqs";

Offline Inkompetent

  • Members
  • *
Re: Problem with Bremmer's Improved AI script
« Reply #1 on: 04 Aug 2007, 14:25:52 »
Oksiedo. I fixed it myself. It just looked to me that I should list groups (as in pgroup = group this) in the unit array, and not the units as the specific soldiers (leader of each group). Now it is working perfectly though!