Lua ScenEdit_AddUnit issue

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
User avatar
Hestia
Posts: 22
Joined: Tue Feb 28, 2017 10:11 am

Lua ScenEdit_AddUnit issue

Post by Hestia »

I tried to add a downed pilot to a scenario through Lua script, but no matter what I do I end up with the downed pilot and an unknown contact "MOBILE #11" (class unknown, side unknown) on the same location as the downed pilot.
This is the action I use:

Code: Select all

ScenEdit_AddUnit({type = 'Land', name = "Pilot #1", dbid = 2046, side = 'NATO', latitude = '22.16', longitude= '-79.70', autodetectable = 'true', holdfire = 'true', proficiency = 4})
I tried different triggers (time, random time, unit enters area...) but no luck.
What am I doing wrong?
User avatar
CCIP-subsim
Posts: 467
Joined: Tue Nov 10, 2015 6:59 pm

RE: Lua ScenEdit_AddUnit issue

Post by CCIP-subsim »

I think Mikmyk ran into an issue like this before, so he may be able to expand - it may be a problem with the "autodetectable" part. Try and take it out (or set it 'false') and see if that fixes it. If you actually need the unit to be autodetected, then just add another line below and change it to "true" via ScenEdit_SetUnit()
User avatar
Hestia
Posts: 22
Joined: Tue Feb 28, 2017 10:11 am

RE: Lua ScenEdit_AddUnit issue

Post by Hestia »

It worked! Thank you, CCIPsubsim, you saved my day.
Post Reply

Return to “Tech Support”