sfc.itzhak 0 Posted May 11, 2007 hey.. i have a watch tower with an my created optics. i have add 4 section in the optics so they will be used as hidden selctions for the lasing. i use this script to get the distance from the watch tower to the bullt.. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _mg = _this select 0 _ammo = _this select 1; _basename = "\gaza_obj\hud\n" _type = _this select 4 _shell = nearestobject [_this select 0,_this select 4]; ~2 _return =_mg distance _shell; ~.1 ; Break the altitude into integers _alt =_return _a1 = (_alt - _alt mod 10000) / 10000 _a2 = (_alt mod 10000 - _alt mod 1000) / 1000 _a3 = (_alt mod 1000 - _alt mod 100) / 100 _a4 = (_alt mod 100 - _alt mod 10) / 10 _a5 = ((_alt mod 10) - _alt % 1) _str = format["%1%2.pac", _basename, _a1] _mg setobjecttexture[0, _str] _str = format["%1%2.pac", _basename, _a2] _mg setobjecttexture[1, _str] _str = format["%1%2.pac", _basename, _a3] _mg setobjecttexture[2, _str] _str = format["%1%2.pac", _basename, _a4] _mg setobjecttexture[3, _str] _str = format["%1%2.pac", _basename, _a5] _mg setobjecttexture[4, _str] ~4 #HudOFF _mg setobjecttexture[0, ""] _mg setobjecttexture[1, ""] _mg setobjecttexture[2, ""] _mg setobjecttexture[3, ""] _mg setobjecttexture[4, ""] now my q is how do i aplly those hidden selction on the optics? if i missed a detail tell me... thanks in advance sfc Share this post Link to post Share on other sites
BraTTy 0 Posted May 13, 2007 In the past, hidden selections only worked on things that were classed like vehicles (soldier is technically a vehicle too) Is your watchtower a vehicle? Need the named selections within cfgvehicles pardon me if I am wrong, a lil rusty and Arma illiterate Share this post Link to post Share on other sites
Big Dawg KS 6 Posted May 15, 2007 hey..i have a watch tower with an my created optics. i have add 4 section in the optics so they will be used as hidden selctions for the lasing. i use this script to get the distance from the watch tower to the bullt.. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _mg = _this select 0 _ammo = _this select 1; _basename = "\gaza_obj\hud\n" _type = _this select 4 _shell = nearestobject [_this select 0,_this select 4]; ~2 _return =_mg distance _shell; ~.1 ; Break the altitude into integers _alt =_return _a1 = (_alt - _alt mod 10000) / 10000 _a2 = (_alt mod 10000 - _alt mod 1000) / 1000 _a3 = (_alt mod 1000 - _alt mod 100) / 100 _a4 = (_alt mod 100 - _alt mod 10) / 10 _a5 = ((_alt mod 10) - _alt % 1) _str = format["%1%2.pac", _basename, _a1] _mg setobjecttexture[0, _str] _str = format["%1%2.pac", _basename, _a2] _mg setobjecttexture[1, _str] _str = format["%1%2.pac", _basename, _a3] _mg setobjecttexture[2, _str] _str = format["%1%2.pac", _basename, _a4] _mg setobjecttexture[3, _str] _str = format["%1%2.pac", _basename, _a5] _mg setobjecttexture[4, _str] ~4 #HudOFF _mg setobjecttexture[0, ""] _mg setobjecttexture[1, ""] _mg setobjecttexture[2, ""] _mg setobjecttexture[3, ""] _mg setobjecttexture[4, ""] now my q is how do i aplly those hidden selction on the optics? if i missed a detail tell me... thanks in advance sfc Optics can not be accessed, they are not objects. Share this post Link to post Share on other sites
Footmunch 0 Posted May 17, 2007 You _may_ be able to do this via the new HUD/MFD stuff. The biki has a page on it here: http://community.bistudio.com/wiki/HUD Share this post Link to post Share on other sites
Big Dawg KS 6 Posted May 18, 2007 You _may_ be able to do this via the new HUD/MFD stuff. The biki has a page on it here:http://community.bistudio.com/wiki/HUD Doubt it will work on the optics models, it has to be part of the vehicle model. Share this post Link to post Share on other sites