Sideguy   0 Posted December 10, 2023 I have a script that I want to use on all AI units of a side, and I have no idea how to do so. The script itself is below, it simply makes a unit small.  Quote [] spawn {  while {alive dude1} do {  dude1 setObjectScale 0.3;  }; }; The reason why I want to apply it to all units of blufor is that I want to spawn in custom units and they get effected by the script. I did try and make a custom composition with this script, but I ran into the problem of only 1 ai unit being downsized and the unit that was previously downsized returning to normal size. If it is possible to figure out a way to have this be able to be in the init of the unit, and I can just spawn him in via zeus with custom compositions that would be great (could possibly make it into a mod--a Santa faction with elfs.). That's the solution I'd prefer, but I'd be fine with applying the script to either a group of ai or to the entire side. I'm pretty new to scripting, and have no idea what I'm looking for. Thanks for the help. Share this post Link to post Share on other sites
Necropaulo   23 Posted December 10, 2023 Hey, actually your script affect only one unit, the unit call "Dude1". With this script, you need to named every unit in your mission, it will be really reaaaallllyyyy long 😀  You can try something with allUnits, it could be a way to do it easyly. I'm not an expert, so i'm not really sure this is a good way to solve your problem ^^'  Edit: there is a few information in this topic :) Share this post Link to post Share on other sites