Jump to content

Recommended Posts

Hi.

Is it at all possible to read MFD values via script ? 

For example the parameters that are shown circled on the screenshot.

 

 

mu11yB0.jpg

  • Like 2

Share this post


Link to post
Share on other sites
// IDCs and what they do
// !new arrowhead
#define IDC_IGUI_WEAPON_MODE            149
#define IDC_IGUI_WEAPON_GUNNER          150
#define IDC_IGUI_COUNTER_MEASURES_AMMO  151
#define IDC_IGUI_COUNTER_MEASURES_MODE  152

#define IDC_IGUI_RADARRANGE             153
#define IDC_IGUI_VALUE_RELOAD           154
#define IDC_IGUI_WEAPON_AMMO            155

// weapon/turret info controls
#define IDC_IGUI_WEAPON_DISTANCE        151
#define IDC_IGUI_WEAPON_VISION_MODE     152
#define IDC_IGUI_WEAPON_FLIR_MODE       153
#define IDC_IGUI_WEAPON_FOV_MODE        154
#define IDC_IGUI_WEAPON_COMPASS         155
#define IDC_IGUI_WEAPON_HEADING         156
#define IDC_IGUI_WEAPON_AUTOHOVER       157
#define IDC_IGUI_WEAPON_LASER_MARKER_ON 158
#define IDC_IGUI_WEAPON_BALL_ENABLED    159
#define IDC_IGUI_WEAPON_JAVELIN_DAY     160
#define IDC_IGUI_WEAPON_JAVELIN_FLTR    161
#define IDC_IGUI_WEAPON_JAVELIN_NFOV    162
#define IDC_IGUI_WEAPON_JAVELIN_WFOV    163
#define IDC_IGUI_WEAPON_BALL_RANGE      164
#define IDC_IGUI_WEAPON_BALISTIC_COMP   165
#define IDC_IGUI_WEAPON_JAVELIN_SEEK    166
#define IDC_IGUI_WEAPON_JAVELIN_MISSLE  167
#define IDC_IGUI_WEAPON_ELEVATION       168
#define IDC_IGUI_WEAPON_ELEVATION_TEXT  169
#define IDC_IGUI_WEAPON_STATIC_ITEMS    170
#define IDC_IGUI_WEAPON_GPS_PLAYER      171
#define IDC_IGUI_WEAPON_GPS_TARGET      172
#define IDC_IGUI_WEAPON_ARTI_DIST       173
#define IDC_IGUI_WEAPON_ARTI_TIME       174
#define IDC_IGUI_WEAPON_ARTI_ELEV       175
#define IDC_IGUI_WEAPON_ARTI_ELEV_NEED  176
#define IDC_IGUI_WEAPON_ARTI_OUT_RANGE  177
#define IDC_IGUI_WEAPON_ARTI_AUTO_ELEV  178
#define IDC_IGUI_WEAPON_VISION_MODE2    179
#define IDC_IGUI_WEAPON_OPTICS_ZOOM     180
#define IDC_IGUI_WEAPON_TARGET_UNIT     181
#define IDC_IGUI_WEAPON_OPTICS_PITCH    182
#define IDC_IGUI_WEAPON_DISTANCE2       183

// unit info (to preserve order) - new A3
#define IDC_IGUI_AMMOCOUNT              184
#define IDC_IGUI_MAGCOUNT               185
#define IDC_IGUI_TOTAL_AMMO_COUNT       26006
#define IDC_IGUI_TOTAL_MAX_AMMO_COUNT   26106
#define IDC_IGUI_MAX_AMMO_COUNT         26206

#define IDC_IGUI_DEPTH                  186
#define IDC_IGUI_WEAPON_MODE_TEXTURE    187
#define IDC_IGUI_WEAPON_SPEED           188
#define IDC_IGUI_WEAPON_ALT             189
#define IDC_IGUI_WEAPON_TIME            190

#define IDC_IGUI_WEAPON_CAM_TRACK_AREA        194
#define IDC_IGUI_WEAPON_CAM_TRACK_TARGET      195 

#define IDC_IGUI_WEAPON_JAVELIN_ATTACK_FROM_TOP 196
#define IDC_IGUI_WEAPON_JAVELIN_ATTACK_DIRECT  197

#define IDC_IGUI_WEAPON_LASED_DISTANCE          198
#define IDC_IGUI_WEAPON_LASED_SPEED             199
#define IDC_IGUI_WEAPON_LASED_VALID             200

#define IDC_IGUI_WEAPON_LASED_ERR_LEAD          201
#define IDC_IGUI_WEAPON_LASED_ERR_ELEV          202
#define IDC_IGUI_WEAPON_LASED_ERR_OBJECT        203
#define IDC_IGUI_WEAPON_LASER_ZEROING_DELAY     204
#define IDC_IGUI_THROTTLE                       205


 

// you can type that in i.e. debug console
ctrlText (((uiNamespace getVariable ["IGUI_displays", []]) select 6) displayCtrl 198)

something like that works with hand held weapons

 

 

https://community.bistudio.com/wiki/allDisplays

it's all about finding right display (all of them are using idd = 300, so it might be quite confusing to find right one) and read ctrl value from it
 

It's easier with mod, since you can directly pass display to some script with onLoad handler
 

    class rhs_gui_optic_t80_rangefinder: RscUnitInfo
    {
        idd = 300;

        onLoad="['onLoad',_this,'RscUnitInfo','IGUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay'); _this call RHS_fnc_sight_1G42";

[...]

};


 

// RHS_fnc_sight_1G42
    uiNameSpace setVariable ["RHS_1G42_Ctrl",_this select 0];
        disableSerialization;
        _c = uiNamespace getVariable "RHS_1G42_Ctrl";
        //range finder value
        _s = (_c displayCtrl 151);
        //curent mode
        _mode = (_c displayCtrl 154);
[...]

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×