Home   Help Search Login Register  

Author Topic: player countEnemy list triggerOne  (Read 1077 times)

0 Members and 1 Guest are viewing this topic.

Offline limmy3

  • Members
  • *
  • OFP crazy!
player countEnemy list triggerOne
« on: 21 Oct 2008, 23:44:16 »
Hello there,

well since a few hours I'm trying to figure how I can use this command.
I must admit I hope virtually no experience with scripting basic.

this example is show in the COMREF:

Code: [Select]
player countEnemy list triggerOne
But unfortunate there is nothing I could work with.
I put this example in the OnActiv line of a trigger and named it triggerone.
All it did after pressing "OK" was F65S_3_1 [AI name to count the enemy]  countEnemy list triggerOne was

Code: [Select]
F65S_3_1 countEnemy list triggerOne |#|': Error Type Number, expected Nothing
I know that this matter was ask times before but I unfortunately coudn't find the right solution for me.

So if someone perhaps would like to help me.

That's what's happening:

In Lamentin (Everon) at the North side of the town is a plateau at the road.

From the lower north ridge soldiers (West) clim in direction south.
As they can't overlook the whole plateau they stop before reaching the open ground.
The groug leader advances to recon the area and should sideChat how many enemy units are
in the area (trigger 100x50).

[This part has not exactly to do with the count command.]
If the leader doesn't spott the enemy he should advance.
If the leader does spott the enemy but the enemy has not yet spotted the West he should stop count the enemy
> 6 and advance with his formation but should not attack.
If the leader does spott the enemy and the enemy has spotted the West he should attack.

Regards limmy3











The only necessary for triumph of evil is for good men to do nothing.

Walter_E_Kurtz

  • Guest
Re: player countEnemy list triggerOne
« Reply #1 on: 24 Oct 2008, 00:20:14 »
The countEnemy command doesn't appear to work as one would expect. Search the forums for "countEnemy" and try the appended test mission.

My impression of the the countEnemy command is that it works much like Detected by ..., but its output is the number of enemies who consider the unit a threat to be engaged.

In the test mission, you have two radio commands: Alpha (0-0-1) will output the countEnemy of the trigger area, and Bravo (0-0-2) will list the units in the trigger area. The countEnemy number will not rise until the enemies have turned round and spotted you as a target.



Possible uses of countEnemy
You could use it for the final possibility in your attack on Lamentin, as it should give a positive number output once "the Enemy has spotted West", but you may find it easier to use knowsAbout.

It could also be used in place of a "detected by" trigger for an alarm when infiltrating as a lone-wolf, but I'm not certain it has any advantage.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: player countEnemy list triggerOne
« Reply #2 on: 24 Oct 2008, 02:18:07 »
Running into problem sometimes is common when it comes to OFP Command Reference.  You have to know other sorts of information in order to sometimes fully understand how to use a certain command.   

@Walter_E_Kurtz~
You know one the advantages about the "knowsabout" command is it's used for a single soldier or possibly a group.

Instead of detected by is used for detection by east in the whole area of the trigger. 

I learend another new way of editing today.   :good:


Who's hyped for Arma4, long live Arma!