Page 1 of 1

add a mount to a unit

Posted: Fri Oct 06, 2023 12:09 am
by orca
I'm trying to add M142 HIMARS Spiral 3 to a unit. In the editor it says the ID is 3440 for this mount. I've found examples of adding a mount to a unit and have tried to use this.

such as:
ScenEdit_UpdateUnit({name='MYUNIT',mode='add_mount',arc_mount={'360'},dbid=3440})

but I get an error saying "Object reference not set to an instance of an object." Does this mean my dbid for the mount is incorrect? If this is the case how do I find out the dbid of a mount?

Re: add a mount to a unit

Posted: Fri Oct 06, 2023 7:27 am
by blu3s
You need to use guid instead of name in the updateunit function.

Re: add a mount to a unit

Posted: Fri Oct 06, 2023 4:59 pm
by KLAB
https://www.matrixgames.com/forums/view ... 6&t=398167

We sort of covered it here and someone cleverer than me came up with some cool code.. Hope it helps?
K