Home   Help Search Login Register  

Author Topic: how would i get a list of everyone on the map?  (Read 887 times)

0 Members and 1 Guest are viewing this topic.

Javaman

  • Guest
how would i get a list of everyone on the map?
« on: 19 Jan 2004, 01:36:01 »
how would i get a list of everyone on the map?

what i am trying to do in whole is this

i want to make a script to be used only when your making a mission...

i want to use addaction to meplayer(theplayer) that would give me a list of all ai so i can then switch to there cam view to see what there doing ...

here is what im using so far...



Code: [Select]
_unit = units (_this select 0)
_count = count _unit
_i=0
#loop
_u=_unit select _i

? _u == leader _u : titletext [format ["\n\n\n\n\n\n\nFollowing Group Leader %1.", _u],"plain",1]
? _u != leader _u : titletext [format ["\n\n\n\n\n\n\nFollowing Target %1.", _u],"plain",1]

_u addAction ["Player View","callplayer.sqs"]

_u switchCamera "external"
~20

_i=_i+1

?_i<_count:goto "loop"


Player switchCamera "external"



Exit

but this will only work with a group and i guess i could hand code all ai's name in the script but i would hope theres an easier way


thanks
Javaman

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:how would i get a list of everyone on the map?
« Reply #1 on: 19 Jan 2004, 01:57:40 »
best way 2 use list of every1 in a map is a triger ;)

covers all da map nd activateed by every1 ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:how would i get a list of everyone on the map?
« Reply #2 on: 19 Jan 2004, 07:46:38 »
Trigger way as LCD described is the easiest way, but not
the best IMHO.

Those big triggers, covering a large area require a lot of
CPU.

If i would want to have everyone on the map in a list, i would
put them into an array.

When you place your very first unit onto the map, put into it's
init field:

list_of_all = [units this]

And into each other group leaders init fields put that:

list_of_all = list_of_all + units this

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:how would i get a list of everyone on the map?
« Reply #3 on: 19 Jan 2004, 07:57:35 »
lol

Quote
but not
the best IMHO.

:P ;D

Quote
list_of_all = [units this]

shudnt dat b

list_of_all = units this

?

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:how would i get a list of everyone on the map?
« Reply #4 on: 19 Jan 2004, 08:45:54 »
Quote
shudnt dat b

list_of_all = units this


Yeah - off course it should be like that  

I was thinking about another way of creating the array before, and forgot to remove da braggads then.  :-[

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:how would i get a list of everyone on the map?
« Reply #5 on: 19 Jan 2004, 11:51:52 »
"One all!"
Plenty of reviewed ArmA missions for you to play

Javaman

  • Guest
Re:how would i get a list of everyone on the map?
« Reply #6 on: 19 Jan 2004, 20:21:34 »
ok well the trigger will be fine i only need to call it once everytime i want to use this cam script to see what my men are doing....

and to have to put all that in there int box would be more then i wanted to do...but i will use that later im sure for something


but now if i use a trigger just what would my code have to be..

sry but i am new at this

and unit countFriendly array just gives me a number



thanks in advance

and if theres a tut for this by all means point me to it...:)

Javaman