OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started 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;
--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?
-
I should also mention that I have used the above method on a Hidden section of a machinegun with no issues.
-
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
-
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
-
i think you need to use the flagcarrier class, for example
class All {};
class Static : All {};
class Building : Static {};
class Strategic : Building {};
class FlagCarrier : Strategic {};
class Danger : FlagCarrier {};
class oyman_znacka1 : Danger
-
Ok I will definately give that a go, thanks for the tips.
-
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