OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: ryguy on 09 Jul 2010, 02:51:30

Title: animations for multiple people
Post by: ryguy 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!
Title: Re: animations for multiple people
Post by: Loyalguard 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!
Title: Re: animations for multiple people
Post by: Wolfrug 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.