Home   Help Search Login Register  

Author Topic: hidden selctions on the optics  (Read 1567 times)

0 Members and 1 Guest are viewing this topic.

Offline sfc.itzhak

  • Members
  • *
hidden selctions on the optics
« on: 28 Apr 2007, 18:02:11 »
double sry..
« Last Edit: 11 May 2007, 21:38:29 by sfc.itzhak »

Offline sfc.itzhak

  • Members
  • *
Re: hidden selactions in optika?
« Reply #1 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-
« Last Edit: 13 May 2007, 18:46:57 by h- »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: hidden selctions on the optics
« Reply #2 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..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.