Teleport or spawn?

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
User avatar
djoos5
Posts: 390
Joined: Fri Oct 25, 2013 5:45 pm
Location: Ohio

Teleport or spawn?

Post by djoos5 »

It has been a while since I did any scenario building and I am sure that these questions have been asked before, so forgive me if I ask again...

Is the Teleport action still the only way to simulate the 'spawning' of a unit (ie a marine platoon from a helicopter), or is there some new LUA code that allows me to spawn a unit by type and side?

Is there now LUA code that will change the side of a facility or unit to simulate its capture? Or do I need to still use the teleport action to port out the original and port in the same type unit assigned to the 'capturing' side?

Thanks in advance for the help?
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: Teleport or spawn?

Post by KnightHawk75 »

Yes there are LUA functions to spawn a unit of a given type on a given side (and have been for awhile now, ScenEdit_AddUnit).
Yes there are LUA functions to change the side of a facility or unit to simulate it's capture (ScenEdit_SetUnitSide).
ref: http://commandlua.github.io/index.html

If you run into trouble or need help with something specific post in the lua legion sub forum.



User avatar
djoos5
Posts: 390
Joined: Fri Oct 25, 2013 5:45 pm
Location: Ohio

RE: Teleport or spawn?

Post by djoos5 »

Thank you very much!
Post Reply

Return to “Mods and Scenarios”