Unit - Create 2 Rifleman for Player 6 (Orange) at (Center of Spawn 1 top ) facing Default building facing (270.0) degrees Unit - Create 2 Spawn_Type for Player 6 (Orange) at (Center of Spawn 1 bottom ) facing Default building facing (270.0) degrees Unit - Create 2 Spawn_Type for Player 6 (Orange) at (Center of Spawn 1 middle ) facing Default building facing (270.0) degrees Unit - Create 2 Spawn_Type for Player 6 (Orange) at (Center of Spawn 1 top ) facing Default building facing (270.0) degrees Unit - Create 1 Lich for Player 12 (Brown) at (Center of Spawn 2 bottom ) facing Default building facing (270.0) degrees Unit - Create 1 Lich for Player 12 (Brown) at (Center of Spawn 2 middle ) facing Default building facing (270.0) degrees Unit - Create 1 Lich for Player 12 (Brown) at (Center of Spawn 2 top ) facing Default building facing (270.0) degrees Unit - Create 1 Death Knight for Player 12 (Brown) at (Center of Spawn 2 bottom ) facing Default building facing (270.0) degrees Unit - Create 1 Death Knight for Player 12 (Brown) at (Center of Spawn 2 middle ) facing Default building facing (270.0) degrees Set AI_Heroes_Player12 = (Last created unit) Unit - Create 1 Death Knight for Player 12 (Brown) at (Center of Spawn 2 top ) facing Default building facing (270.0) degrees Unit - Create 1 Shadow Hunter for Player 6 (Orange) at (Center of Spawn 1 bottom ) facing Default building facing (270.0) degrees Unit - Create 1 Shadow Hunter for Player 6 (Orange) at (Center of Spawn 1 middle ) facing Default building facing (270.0) degrees Unit - Create 1 Shadow Hunter for Player 6 (Orange) at (Center of Spawn 1 top ) facing Default building facing (270.0) degrees Unit - Create 1 Child of the Sun for Player 6 (Orange) at (Center of Spawn 1 bottom ) facing Default building facing (270.0) degrees Unit - Create 1 Child of the Sun for Player 6 (Orange) at (Center of Spawn 1 middle ) facing Default building facing (270.0) degrees Set AI_Heroes_Player6 = (Last created unit) Unit - Create 1 Child of the Sun for Player 6 (Orange) at (Center of Spawn 1 top ) facing Default building facing (270.0) degrees (Execution count of (This trigger)) Equal to 1 If (All Conditions are True) then do (Then Actions) else do (Else Actions) There are the triggers, for reference purposes: That, however, would lag pretty bad each time it spawned and moved. There is an alternaet, and could be done in ONE trigger. I have 4 triggers that handle this, checking which player entered, and has multiple events for each region. In a normal AoS style map, there are usually three spawn points for each team, and to move points in the corner for both. This will order each computer you have that you ran the script for, custom abilities. After that, in your Map Initlization rigger, add the action "Run Melee AI Script" and add your new script there. Then, you can go to the Import Manager (Module->Import Manager) and remove the "AI Data". YOu can remove all checks, all waves, everything else, then go to File->Add to Map and then it will be in your Import Manager. There, you go under Custom Data:" and add your Object Data. Then, you can go to the Object Editor, go to File->Export all Object Data", and go back to the AI Editor. Lastly, you can go to the AI Editor (Module->AI Editor) and create a new dummy AI Script. Then, you would go to the Object Editor, hit ctrl + D, find your spell, and copy that code, then paste it where it has the spell in your dummy trigger.
The other way is to order your unit the Raw Code of the ability, by making a dummy trigger with your functions, and using the action "Issue Order Targeting" with any spell in it's place, then converting it to Custom Text. For abilities like Frost Nova, we would use "Issue Order Targeting a Unit Order to Undead Lich - Frost Nova ". So for something like Locust Swarm, we would use the action "Issue Order With No Target Order to Undead Crypt Lord - Locust Swarm". Depending on what type of spell your using, if your usin a no target ability like Locust Swarm, or a targetable ability like blink, then you would use one of the three actions, "Unit - Issue Order Targeting a Point", "Unit - Issue Order Targeting a Unit", "Unit - Issue Order With No Target". The first is using the basic GUI functions, and ordering the unit the order string of the spell. This tutorial shows a wide variety of orders and functions, controlling any unit with no control over a player.