PDA

View Full Version : hidden selctions on the optics



SFC.ITZHAK
May 11 2007, 17:24
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 = &#34;&#92;gaza_obj&#92;hud&#92;n&#34;
_type = _this select 4
_shell = nearestobject &#91;_this select 0,_this select 4&#93;;


~2



_return =_mg distance _shell;




~.1

; Break the altitude into integers
_alt =_return
_a1 = &#40;_alt - _alt mod 10000&#41; / 10000
_a2 = &#40;_alt mod 10000 - _alt mod 1000&#41; / 1000
_a3 = &#40;_alt mod 1000 - _alt mod 100&#41; / 100
_a4 = &#40;_alt mod 100 - _alt mod 10&#41; / 10
_a5 = &#40;&#40;_alt mod 10&#41; - _alt % 1&#41;

_str = format&#91;&#34;%1%2.pac&#34;, _basename, _a1&#93;
_mg setobjecttexture&#91;0, _str&#93;
_str = format&#91;&#34;%1%2.pac&#34;, _basename, _a2&#93;
_mg setobjecttexture&#91;1, _str&#93;
_str = format&#91;&#34;%1%2.pac&#34;, _basename, _a3&#93;
_mg setobjecttexture&#91;2, _str&#93;
_str = format&#91;&#34;%1%2.pac&#34;, _basename, _a4&#93;
_mg setobjecttexture&#91;3, _str&#93;
_str = format&#91;&#34;%1%2.pac&#34;, _basename, _a5&#93;
_mg setobjecttexture&#91;4, _str&#93;


~4

#HudOFF
_mg setobjecttexture&#91;0, &#34;&#34;&#93;
_mg setobjecttexture&#91;1, &#34;&#34;&#93;
_mg setobjecttexture&#91;2, &#34;&#34;&#93;
_mg setobjecttexture&#91;3, &#34;&#34;&#93;
_mg setobjecttexture&#91;4, &#34;&#34;&#93;


[/QUOTE]

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

BraTTy
May 13 2007, 01:35
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

Big Dawg KS
May 15 2007, 03:37
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 = &#34;&#92;gaza_obj&#92;hud&#92;n&#34;
_type = _this select 4
_shell = nearestobject &#91;_this select 0,_this select 4&#93;;


~2



_return =_mg distance _shell;




~.1

; Break the altitude into integers
_alt =_return
_a1 = &#40;_alt - _alt mod 10000&#41; / 10000
_a2 = &#40;_alt mod 10000 - _alt mod 1000&#41; / 1000
_a3 = &#40;_alt mod 1000 - _alt mod 100&#41; / 100
_a4 = &#40;_alt mod 100 - _alt mod 10&#41; / 10
_a5 = &#40;&#40;_alt mod 10&#41; - _alt % 1&#41;

_str = format&#91;&#34;%1%2.pac&#34;, _basename, _a1&#93;
_mg setobjecttexture&#91;0, _str&#93;
_str = format&#91;&#34;%1%2.pac&#34;, _basename, _a2&#93;
_mg setobjecttexture&#91;1, _str&#93;
_str = format&#91;&#34;%1%2.pac&#34;, _basename, _a3&#93;
_mg setobjecttexture&#91;2, _str&#93;
_str = format&#91;&#34;%1%2.pac&#34;, _basename, _a4&#93;
_mg setobjecttexture&#91;3, _str&#93;
_str = format&#91;&#34;%1%2.pac&#34;, _basename, _a5&#93;
_mg setobjecttexture&#91;4, _str&#93;


~4

#HudOFF
_mg setobjecttexture&#91;0, &#34;&#34;&#93;
_mg setobjecttexture&#91;1, &#34;&#34;&#93;
_mg setobjecttexture&#91;2, &#34;&#34;&#93;
_mg setobjecttexture&#91;3, &#34;&#34;&#93;
_mg setobjecttexture&#91;4, &#34;&#34;&#93;




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[/QUOTE]
Optics can not be accessed, they are not objects.

Footmunch
May 17 2007, 16:19
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

Big Dawg KS
May 18 2007, 22:48
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.