LUA Scenedit_AddUnit vs. Scenedit_SetUnit

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
bearhunter007
Posts: 23
Joined: Sat Mar 11, 2017 2:51 am

LUA Scenedit_AddUnit vs. Scenedit_SetUnit

Post 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
User avatar
michaelm75au
Posts: 12466
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: LUA Scenedit_AddUnit vs. Scenedit_SetUnit

Post by michaelm75au »

You use 'unit = Scenedit_GetUnit()' to read the unit information, and then use 'unit.base' to see it's base.
Michael
Post Reply

Return to “Mods and Scenarios”