Jump to content
Sign in to follow this  
sfc.itzhak

hidden selctions on the optics

Recommended Posts

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

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
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×