Page 1 of 1

LUA Scenedit_AddUnit vs. Scenedit_SetUnit

Posted: Sun Mar 19, 2017 7:12 pm
by bearhunter007
As I understand it from the commandlua.github.io website you can add a unit and set its base for a new unit. However you can only read the base for a unit with the Scenedit_SetUnit() function.

Is my interpretation of the "NewUnit" vs "Unit" arguments in the respective functions correct?

Thks,

Bearhunter007

RE: LUA Scenedit_AddUnit vs. Scenedit_SetUnit

Posted: Mon Mar 20, 2017 7:19 am
by michaelm75au
You use 'unit = Scenedit_GetUnit()' to read the unit information, and then use 'unit.base' to see it's base.