Jump to content
Sign in to follow this  
A.W.O.L

Multiple doors and ladders

Recommended Posts

How do u make a model that has several doors AND ladders that work independantly - ie when u press open door only the door near u opens.

I know it is possible as in Resistance there is that tall 8 story or something building which has to ladders And to doors. The door to get itno lift. Ladder to climb on top of lift, ladder to climb from top of lift up shaft to roof. Door to get out onto roof from lift shaft.

Please help - is it to do with config - what do u put it it? - or is it to do with naming the second set of points in the memory LOD differently eg:

normaly there are two points for a ladder: start and end - for another ladder would they also be called that or something like start2 and end 2 - if not how does it know which group each is - u mighgt climb from ladder 1 start to ladder 2 end surely? which would be bad.

Hope this makes sense and that there is a way that somone can tel me how to solve this problem.

Thanks

Share this post


Link to post
Share on other sites

Make different animations for the doors and then using UserAction in config.cpp difine each of your doors.

Share this post


Link to post
Share on other sites

Ok cheers for all the feedback and help.

Problem is I am really not that good at configs.

I made a warehouse - the model has 2 ladders and a door, which I would like to get to work.

Forgetting activating the door for the moment - for now lets say it does not open. How exactly do u get it to have to functional ladders - in tyhe model under memory LOD one ladder has memory pints called start and end, whilst the other has them called start1 and end 1 as you told me. Here is the congif - perhaps the ladders will work only know the addon does not appear in game - probably due to config.

Can u spot any main mistakes?

Here it is:

class CfgPatches

{

class Warehouse

{

units[] = {Warehouse};

weapons[] = {};

requiredVersion = 1.40;

};

};

class CfgVehicles

{

class All {};

class AllVehicles: All {};

class Land: AllVehicles {};

class Static : Land {};

class Building : Static {};

class NonStrategic : Building {};

class Fence : NonStrategic {};

class WireFence: Fence {};

class House: NonStrategic {};

class ViewTower2: House{};

class Warehouse: ViewTower2

{

scope=2;

model="Warehouse";

ladders[]={{"start","end"}, {"start1","end1"}};

};

vehicleClass="Objects";

side=TCivilian;

cost=1;

mapSize=1;

displayName="Warehouse";

icon="unknown_move";

model=\Warehouse\Warehouse;

armor=80000;

};

};

If I can get this sorted then I can think about trying to get a door to work as well - for I can get a building that has only a moving door to work - just not one that has ladder as well.

To do with the config.

If u could correct my config I would be so greatfull and will release the addon !

Thank u all

A.W.O.L

Share this post


Link to post
Share on other sites

There is one superfluous }; in your config, just below the ladders array, terminating class Warehouse prematurely.

Share this post


Link to post
Share on other sites

Yeah - thats it - and also got rid of the

model="Warehouse";

bit and then - it worked !

Thank you so much guys ! It is so damn cool to have 2 ladders in a building.

However one last thing - how do u add a working door to the same config?

Thanks for everything so far - it has really made my day - release of addon will happen soon.

biggrin.gif

Share this post


Link to post
Share on other sites

And that about 2 doors in same building?

I'm not able to get Door 2 to work, but the door 1 is working.

class CfgModels

{

class Default { };

class 21VB_SHELTER: Default

{

sections[]={"dvere1","dvere2"};

sectionsInherit="";

};

};

class CfgPatches

{

class HouseClass

{

units[]={HouseTest};

weapons[] = {};

requiredVersion = 1.75;

requiredAddons[]={"BIS_Resistance"};

};

};

class CfgVehicles

{

class All {};

class Static: All {};

class Building: Static {};

class NonStrategic: Building {};

class TargetTraining: NonStrategic {};

class TargetGrenade: TargetTraining {};

class blockhouse: TargetGrenade

class HouseTest: TargetGrenade

{

irTarget = true;

model="\houseT\houseT.p3d";

displayName="HouseT";

nameSound="Bunker";

armor=4000;

cost=1000000;

accuracy=0.20;

class Animations

{

class Dvere1

{

type="rotation";

animPeriod=1;

selection="dvere1";

axis="osa_dvere1";

angle0=0;

angle1=1.6;

};

class Dvere2

{

type="rotation";

animPeriod=1;

selection="dvere2";

axis="osa_dvere2";

angle0=0;

angle1=1.6;

};

};

class UserActions

{

class OpenDoors1

{

displayName="Open Door1";

position="osa_dvere1";

radius=1.5;

condition="this animationPhase ""Dvere1"" < 0.5";

statement="this animate [""Dvere1"", 1]";

};

class CloseDoors1

{

displayName="Close Door1";

position="osa_dvere1";

radius=1.5;

condition="this animationPhase ""Dvere1"" >= 0.5";

statement="this animate [""Dvere1"", 0]";

};

class OpenDoors2

{

displayName="Open Door2";

position="osa_dvere2";

radius=1.5;

condition="this animationPhase ""Dvere2"" < -0.5";

statement="this animate [""Dvere2"", 1]";

};

class CloseDoors2

{

displayName="Close Door2";

position="osa_dvere2";

radius=1.5;

condition="this animationPhase ""Dvere2"" >= 0.5";

statement="this animate [""Dvere2"", 0]";

};

};

};

};

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  

×