I think it would be nice to have a function to block units in scenarios.
Like you need to reach this objective to unlock this unit. I made a scenario using this feature:
DOWNLOADYou need to checkout
titison/megaglest-source/tree/feature/lua_blockUnits to try
Syntax is
setLockedUnitForFaction(unitName,FactionIndex,1=true;0=false)
--Lock the unit
setLockedUnitForFaction('battlemage',0,[color=red]1[/color])
--Unlock the unit
setLockedUnitForFaction('battlemage',0,[color=red]0[/color])
Please correct me (and my pull request) if this is wrong but i think MegaGlest can't read boolean values from lua or there arent any real bools in lua
Or does this even work with true and false? i dont think so.
Of course you can do this already with some kind of hidden upgrade for example but you need a new techtree for this and its inconvenient.
Do you think this is a good idea or just needless stuff?
Pull RequestEDIT:
There is a bug i need to fix before you merge this pull request. ( not saved in savegames i think ) fixed