Home   Help Search Login Register  

Author Topic: Scripting Questions  (Read 545 times)

0 Members and 1 Guest are viewing this topic.

Ace Productions

  • Guest
Scripting Questions
« on: 08 Aug 2003, 12:58:28 »
Thanks to macguba for the suggestion. I've removed some triggers and the error disappeared.

Now I have a few more questions about scripting:

1) I have the following units ej1, ej2…ej10 (not in a group) and a trigger executes the following line:

[ej1,ej2,ej3,ej4,ej5,ej6,ej7,ej8,ej9,ej10] Join me

The units join me, but when I order them to return to formation the order all follow ej3 or ej6 etc is issued. I've checked and all units are privates.


2) If I have we1,we2,we3…we20 as enemy units and I want to apply (enemyunit KnowsAbout me)>2
    as a condition in a trigger for all of them, what is the best way of doing it instead of writing it for    
    each  one of them.

3) The same question applies if I want to set the condition Getdammage  
     enemyunit >=1.

max_killer_payne

  • Guest
Re:Scripting Questions
« Reply #1 on: 08 Aug 2003, 13:10:39 »
I can help with the first two:

1. Try making yourself a high rank like a Captain. I had the same problem, cant remember how i solved it though.

2. grp=this; "_X KnowsAbout unit" foreach units grp

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Scripting Questions
« Reply #2 on: 08 Aug 2003, 17:14:58 »
Hmmm .... max I'm not sure your answer to 2 will work.     knowsabout returns a number between 0 and 4 (I think) and even if the game can handle a bunch of numbers you haven't told it what to do with them.    ForEach is best used with a command, which doesn't return anything.

I suspect you need to use count.  Something like this:

"_x knowsabout loon1 > 2" count units grp == count units grp

That's only a guess though.  

I don't understand question 3.   Do you mean not alive?    And if it was the whole group why not just use a not present trigger?

Question 1 the problem is that you are not number 1 in the new group.    If making yourself a captain doesn't work then try making them join your group rather than you as an individual, that might make a difference.
Plenty of reviewed ArmA missions for you to play

peter

  • Guest
Re:Scripting Questions
« Reply #3 on: 08 Aug 2003, 17:30:43 »
i guess if all enemys know your position yourÂ're already dead ...  ;D

_enemy = [we1,we2,we3…we20]
"_x knowsabout player > 2" count _enemy > 0


would do it if only one of them knows about you ...