OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: PRiME on 27 Jun 2005, 06:32:10

Title: HiddenSelection not working on my Bridge
Post by: PRiME on 27 Jun 2005, 06:32:10
I have made a bridge and wish to hide parts for different variations, for example on and off ramp etc.

I have labled the Ramps osal and osar, I have done this in 0.500/1.125/FireGeo/Geo/RoadWay/ViewGeo

My config uses this;
Code: [Select]
--cfgmodel--
   class All {};
   class Static:All {};
   class Building:Static {};
   class pontoonbridge:Building
      {
         sectionsInherit="";
         sections[]={"osar","osal"};
      };


--cfgvehicle---
class mybridge: Building
      {
      armor=1000;
      scope=public;

      hiddenSelections[]={"osal","osar"};

      model="\******\pontoonbridge.p3d";
      destrType=DestructBuilding;
      displayName="Pontoon Bridge (Centre)";
      vehicleClass= $STR******CLASSBUILDING;
      class eventhandlers {killed = "_this exec ""\******\scripts\killed.sqs""";};
   };

Basicly those sections won't go hidden in game, tried multiply ways, I can only assume Im missing something like perhaps buildings can't have hidden sections like this?
Title: Re:HiddenSelection not working on my Bridge
Post by: PRiME on 27 Jun 2005, 06:33:18
I should also mention that I have used the above method on a Hidden section of a machinegun with no issues.
Title: Re:HiddenSelection not working on my Bridge
Post by: Pilot on 27 Jun 2005, 16:35:00
Are you placing this bridge on the map through WRPEdit, WRPTool, or Visitor?  Or are you placing the bridge on the map through the mission editor?  If you are placing the map through one of the three programs listed above the eventhandlers won't work.  I am assuming the eventhandler calls a script which hides the selections.  If this is not the case, ignore my post ::).

-Student Pilot
Title: Re:HiddenSelection not working on my Bridge
Post by: remcen on 28 Jun 2005, 00:06:39
plus hiddenselections don't seem to work at all in building subclasses. i tried it for walls with different writings on them - no chance. neither in wrptool nor in the mission editor
Title: Re:HiddenSelection not working on my Bridge
Post by: oyman on 28 Jun 2005, 00:43:10
i think you need to use the flagcarrier class, for example
Code: [Select]
   class All {};
   class Static : All {};
   class Building : Static {};
   class Strategic : Building {};
   class FlagCarrier : Strategic {};
   class Danger : FlagCarrier {};
   class oyman_znacka1 : Danger
Title: Re:HiddenSelection not working on my Bridge
Post by: PRiME on 28 Jun 2005, 09:58:54
Ok I will definately give that a go, thanks for the tips.
Title: Re:HiddenSelection not working on my Bridge
Post by: DBR_ONIX on 28 Jun 2005, 14:50:32
Yeh, setobjecttexture doesn't work on static objects.
Hmm, I'll try flagcarrier for setobjecttexture stuff in future, ta oyman :)

For the bridges, I think you want to use hiddenselections, not setobjecttexture. HiddenSelections are selections hidden from config, setobjecttexture is hidden via scripts, which aren't really possible via placing the objects via WRPEdit/Tool. I think HiddenSelections work via WRPEdit, but I could well be wrong :P
- Ben