by The Mak » 17 Aug 2013, 21:20
Hmm, have you ever wondered how they added a Monkey Lord with no Laser to the Survival Escape Maps, or a Seraphim Battleship with a high hitpoint regeneration to the Survival Attack map.
The code can be found here:
Survival Escape v3ga, line 989 of Survival_Escape_v3ga_script.lua (may be different in previous versions but look for the section Survival_SpawnDef = function() )
Survival Attack, line 1108 of survivalattack_script.lua
Now those deal with spawning a unit and buffing or removing traits. What if you can do these changes to all of those types of units using scripts. Not saying it is going to be easy. After all GPG used custom blueprints for the campaign, because it was easier than creating custom unit scripts for each map.
You have almost all the pieces there in the map scrip (customize a unit and spawn a unit) now you just need to create the ability to apply that to all units before they are made. Like I said, not going to be easy.
Has anyone tried running a modblueprint function from a map script? Why must a modblueprint function run before a map script?