Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:3.6

Description

Description:

Controls the visibility of the proxies of a vehicle.

Proxies can either be selected by their path names (by passing an arrays of strings, which must match the beginning of the proxies paths), or using a newly introduced proxy class, which are defined as in the following example:

class cfgVehicles {
  class M1A1 : M1A1_base {
    ... 
    // standard definitions
    ...
    class hideableProxies {
      // class containing all 'weapon' proxies
      class weapons {
        class proxy1 {
          model = "\vbs\weapons\machinegun\pkt.p3d";
          show = true;
        };
        class proxy2 {
          model = "\vbs\weapons\launcher\mk23.p3d";
          show = false;
        };
      };

      // class containing all 'armor' proxies
      class armor {
        class proxy1 {
          model = "\vbs\vehicles\armor\slat.p3d";
          show = false;
        };
        class proxy2 {
          model = "\vbs\vehicles\armor\plate.p3d";
          show = false;
        };
      };
    };
  };
};

Class  hideableProxies is part of the vehicle configuration, and contains one or more sub-classes which specify the proxy types (in the above example, class weapons and class armor). This proxy-type class then contains whichever proxies are affected, when specifying this type in the command. Each proxy class (the proxy class names are arbitrary) contains the model path (model) and the default visibility (show) for the affected proxy.

If the path method is used on vehicles that have hideableProxies defined, then only those proxies that are not defined in that class are affected.

Syntax

Syntax:vehicle showProxies [proxypath, visibility]
Parameters:
  • vehicle: Object - Vehicle without hideableProxies definitions.
  • proxypath: Array of String - All proxies, whose paths start with the specified string are affected. Must start with backslash.
  • visibility: Boolean - If true, then proxy will be visible.
Return Value:Nothing

Alternative Syntax

Syntax:vehicle showProxies [proxytype, visibility]
Parameters:
  • vehicle: Object - Vehicle without hideableProxies definitions.
  • proxytype: String - If a proxy type is defined in hideableProxies, and specified in this argument, then it is affected.
  • visibility: Boolean - If true, then proxy is visible.
Return Value:Nothing

Examples

Examples:
Hide all proxies whose path starts with "\vbs2\weapons":
{_x showProxies [["\vbs2\weapons"], false]}forEach allVehicles

Hide all proxies defined in the 'hideableProxies' class 'weapons':
car1 showProxies ["weapons",false];

Additional Information

See also:
Multiplayer:
Problems:

Notes