Page 1 of 1

ScenEdit_SetSidePosture

Posted: Fri Jan 20, 2023 4:24 am
by DavidRN
Hi

I used the Lua scripting as below to set side posture in a area defined by RP's

ScenEdit_SetSidePosture("Hostage Ship", "JMSDF", "F")
inArea=({'RP-69', 'RP-70', 'RP-71', 'RP-72'})

Seems to work okay as I did a test run and the hostage ship changed from hostile towards the JMSDF to friendly, when a JMSDF helicopter entered the area, only knew this when editing sides and saw the change, the hostage ship remained red.

Is there any way I can change the color at the time of change in side posture? e.g red to blue

David

Re: ScenEdit_SetSidePosture

Posted: Fri Jan 20, 2023 1:44 pm
by Parel803
Good evening,

Not an answer but I had something simulare with change side, and with that the posture.
Contact stayed in the original color. After deleting the contact it came back in the correct color.
I can look for what I did if required.

best regards GJ

Re: ScenEdit_SetSidePosture

Posted: Fri Jan 20, 2023 10:20 pm
by DavidRN
Parel803 wrote: Fri Jan 20, 2023 1:44 pm Good evening,

Not an answer but I had something simulare with change side, and with that the posture.
Contact stayed in the original color. After deleting the contact it came back in the correct color.
I can look for what I did if required.

best regards GJ
That would be good if could.

DB

Re: ScenEdit_SetSidePosture

Posted: Sat Jan 21, 2023 10:42 am
by Parel803
DavidRN,

I have to apologize. Cannot get it as I thought I saw it. My contact that change side with posture to new. In pause game you see at that moment two contact, looks like, and the (in my case friendly) stays on when pressing play.
I'm on latest beta. And tried to simulate boarding ops.

regards GJ

Re: ScenEdit_SetSidePosture

Posted: Sat Jan 21, 2023 5:27 pm
by KnightHawk75
Is there any way I can change the color at the time of change in side posture? e.g red to blue

If I understand this correct...and I might not...
You change some stuff from hostile to friendly (but not the side membership), but you have a lingering perhaps duplicate hostile contact object still around and you want to remove it? Yes you can remove that contact via getting the contact object and invoking :delete(). You can find that various ways, usually if you already have the real units object wrapper peeking into .ascontact table, and grabbing the contactguid that matches the sideguid you want it removed from, assuming this is a duplicate at same exact location issue. I can't recall having to do that before with posture changes but I can recall having to do it when cleaning up contacts after side changes. IDK I might be off on what's actually being asked here if so ignore me. sample of problem?

Re: ScenEdit_SetSidePosture

Posted: Sat Jan 21, 2023 8:24 pm
by DavidRN
KnightHawk75 wrote: Sat Jan 21, 2023 5:27 pm Is there any way I can change the color at the time of change in side posture? e.g red to blue

If I understand this correct...and I might not...
You change some stuff from hostile to friendly (but not the side membership), but you have a lingering perhaps duplicate hostile contact object still around and you want to remove it? Yes you can remove that contact via getting the contact object and invoking :delete(). You can find that various ways, usually if you already have the real units object wrapper peeking into .ascontact table, and grabbing the contactguid that matches the sideguid you want it removed from, assuming this is a duplicate at same exact location issue. I can't recall having to do that before with posture changes but I can recall having to do it when cleaning up contacts after side changes. IDK I might be off on what's actually being asked here if so ignore me. sample of problem?

Thanks for that got a spare Sunday so I will play around with Lua and see what I can find.

DB