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: animations for multiple people  (Read 2805 times)

0 Members and 1 Guest are viewing this topic.

Offline ryguy

  • Members
  • *
animations for multiple people
« on: 09 Jul 2010, 02:51:30 »
Hi all, so I'm trying to make a large crowd of people all do the same animation but this is very hard when there are a ton of units. In the trigger I would have to name 30 people and then put in "unit1 playmove movename; unit2 playmove movename" etc...
Any easier way to do this? Thanks!

Offline Loyalguard

  • Former Staff
  • ****
Re: animations for multiple people
« Reply #1 on: 09 Jul 2010, 06:26:01 »
This is untested but make sure all the units are in the same group and then put the following code in the trigger:

Code: [Select]
{_x playMove movename} forEach units group groupname;

Change groupname to whatever name of the group is. If putting all the units in the same group doesnt work for you please advise.

Good luck!

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: animations for multiple people
« Reply #2 on: 09 Jul 2010, 08:22:56 »
Or, place a trigger covering the units, activated by whatever side they are (or anybody), and then place this code in the On Activation field:

Code: [Select]
{_x playMove movename} forEach thisList;
If you need it activated at a certain moment, just make the trigger condition something else than 'this' or 'true' :) If you want it activated in e.g. a script, just name the trigger (in the name field, not text!), and use this code in your script:

Code: [Select]
{_x playMove movename} forEach list triggerName;
Good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"