Jump to content

BUG: API - Model key 34 and 38 (Doors) always return 1 (open)


Apple

Recommended Posts

When testing with the Gazelle, I found the the previously working check if the doors are open now always returns 1 (open). The Model Viewer shows that the keys for the doors haven't changed, so it must be something else introduced lately.
 

local ret_val = false

local unit = Unit.getByName(unit_name)
 f string.find(type_name, "SA342" ) and unit:getDrawArgumentValue(34) == 1 or unit:getDrawArgumentValue(38) == 1 then
          BASE:T(unit_name .. " front door(s) are open")
          ret_val =  true
  end

Thanks!


Edited by Apple
typo
Link to comment
Share on other sites

We'll check it out, see if it is something we can fix on our end but the arguments are still the same. The only thing that might have changed is the option to remove doors on the SA-342L, which will, when enabled, return 1 in this draw arg check. The visibility arg for removing the doors completely is 1338. 

Community Manager Account



DrummerNL

[TABLE]

[/TABLE]

Discord - Facebook - Gazelle sitreps

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

I tested the returns using and get correct results:

 

local u = Unit.getByName('SA342M')
   if u:getDrawArgumentValue(34) == 1 then
      trigger.action.outTextForCoalition(coalition.side.BLUE, "Doors are open!", 25)
   else
      trigger.action.outTextForCoalition(coalition.side.BLUE, "Doors are closed!", 25)
 end

 

Community Manager Account



DrummerNL

[TABLE]

[/TABLE]

Discord - Facebook - Gazelle sitreps

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Great! I used an old demo mission of mine to test this behaviour; sometimes for whatever reason a fresh version works differently maybe due to how the ME saves stuff (eg ammotables on AFBs if you put in a limitation etc). I’ll build a fresh one and confirm 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...