OFPEC Forum

Addons & Mods Depot => ArmA - Addons & Mods Discussion => Topic started by: sfc.itzhak on 28 Apr 2007, 18:02:11

Title: hidden selctions on the optics
Post by: sfc.itzhak on 28 Apr 2007, 18:02:11
double sry..
Title: Re: hidden selactions in optika?
Post by: sfc.itzhak on 11 May 2007, 21:37:17
ok since no one answers..
i will sharpe my q
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..
Code Sample

Code: [Select]
_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

EDIT: Use the code tags when posting long bits of code   h-
Title: Re: hidden selctions on the optics
Post by: h- on 13 May 2007, 18:49:19
Not sure that it's possible to use setObjectTexture for the optics as you would need to define hiddenSelections for it in the config, and at least in OFP there were no config class for optics models..