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: Pass group name to script then getpos of the leader  (Read 1806 times)

0 Members and 1 Guest are viewing this topic.

Offline mcnorth

  • Members
  • *
Pass group name to script then getpos of the leader
« on: 14 Mar 2007, 19:50:07 »
Can anyone tell me how to get the leader from a group after the group name has been passed to a script?

I'm trying to determine the distance between the player and an enemy group leader for spawning purposes. I want to work with the group name rather than the enemy leader name so that if the leader is killed the script will then work with the new leader.

Any tips are appreciated.

Thanks

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Pass group name to script then getpos of the leader
« Reply #1 on: 14 Mar 2007, 19:52:52 »
the command leader is probably what you're after.

Offline mcnorth

  • Members
  • *
Re: Pass group name to script then getpos of the leader
« Reply #2 on: 15 Mar 2007, 03:04:19 »
You're right but I get an error when I pass the group name to a variable in the script. It works if I use the group name (global variable) defined in the leader units init field but not with a local variable in the script.

ps - It looks like I unintentionally duplicated this post. I guess the first try, when everything froze up, went through after all. sorry about that.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Pass group name to script then getpos of the leader
« Reply #3 on: 15 Mar 2007, 08:08:48 »
Doppelganger.

Locking this one..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.