Jump to content
Sign in to follow this  
Guest

Adding a Door to an object

Recommended Posts

... actions only appear to the player when their cursor is over a visible part of the object (I'm thinking it's actually determined by view geometry).

Thats what Armored Sheep said in another post .....

Share this post


Link to post
Share on other sites
Gnat @ Aug. 03 2007,15:30)]
... actions only appear to the player when their cursor is over a visible part of the object (I'm thinking it's actually determined by view geometry).

Thats what Armored Sheep said in another post .....

Quote[/b] ] I notice that for vehicles you can alter the getin radius which helps in locating the action but for statics we only have one radius , also even with default bis ladders unless i go to scope and look at the ladder or ammo crate for that matter , the action wont appear does the view geo lod have something to do with it ?

and me a few posts back . looks like we have a pattern developing.

no luck here yet .

Share this post


Link to post
Share on other sites

Here's a simple addon and example mission.

UNNUserActions.zip

The user action works fine. Nothing special about the model or config, I used:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches

       {

       class MyHouse

               {

               units[] = {"MyHouse"};

               weapons[] = {""};

               requiredVersion = 1.08;

               requiredAddons[] = {};

               };

       };

class cfgVehicles

       {

       class House;

       class MyHouse : House

               {

               scope=2;

               displayName="My House";

               model="\MyHouse\MyHouse.p3d";

               class UserActions

                       {

                       class MyAction

                               {

                               displayNameDefault="<img image='\ca\ui\data\ui_action_open_ca.paa' size='4'/>";

                               displayName="My Action";

                               position="myaction";

                               radius=10;

                               onlyForPlayer=1;

                               condition="True";

                               statement="Hint ""Action""";

                               };

                       };

               };

So I cant help thinking it's a problem with your user action conditions or your p3d?

Share this post


Link to post
Share on other sites
Here's a simple addon and example mission.

UNNUserActions.zip

The user action works fine. Nothing special about the model or config, I used:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches

{

class MyHouse

{

units[] = {"MyHouse"};

weapons[] = {""};

requiredVersion = 1.08;

requiredAddons[] = {};

};

};

class cfgVehicles

{

class House;

class MyHouse : House

{

scope=2;

displayName="My House";

model="\MyHouse\MyHouse.p3d";

class UserActions

{

class MyAction

{

displayNameDefault="<img image='\ca\ui\data\ui_action_open_ca.paa' size='4'/>";

displayName="My Action";

position="myaction";

radius=10;

onlyForPlayer=1;

condition="True";

statement="Hint ""Action""";

};

};

};

So I cant help thinking it's a problem with your user action conditions or your p3d?

I can see your user actions displayed in your addon, nothing more. The problem is that door wont open and all my commands in config and P3D coding seems ok, with the door defined in the lods and the correct memory axis. I've test my p3d model in OFP and door works fine. With ArmA i can only get the visualisation of the command, no anim... sad_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ] The problem is that door wont open and all my commands in config and P3D coding seems ok, with the door defined in the lods and the correct memory axis. I've test my p3d model in OFP and door works fine. With ArmA i can only get the visualisation of the command, no anim

That sounds like a problem with your animation definitions, in the config. Have you looked at Arma.rpt to see if there are any errors relating to CfgSkeletons, Bones or missing Vertex?

Share this post


Link to post
Share on other sites
Guest
Quote[/b] ] The problem is that door wont open and all my commands in config and P3D coding seems ok, with the door defined in the lods and the correct memory axis. I've test my p3d model in OFP and door works fine. With ArmA i can only get the visualisation of the command, no anim

That sounds like a problem with your animation definitions, in the config. Have you looked at Arma.rpt to see if there are any errors relating to CfgSkeletons, Bones or missing Vertex?

What i find strange....is that the addon you supplied...doesnt even show up in the editor... So I think my machine is cursed... nothing else i can do now... sad_o.gif

Share this post


Link to post
Share on other sites

I can only assume MIG didn’t have the same problem. As it happens, since then, I tested it a little bit more. If you replace:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">model="\MyHouse\MyHouse.p3d";

With:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">model="\CA\Buildings\Misc\KBud"

The animation works fine. So I guess it's down to the p3d. BTW KBud is Arma's default model for the outside toilet smile_o.gif

Share this post


Link to post
Share on other sites
I can only assume MIG didn’t have the same problem. As it happens, since then, I tested it a little bit more. If you replace:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">model="\MyHouse\MyHouse.p3d";

With:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">model="\CA\Buildings\Misc\KBud"

The animation works fine. So I guess it's down to the p3d. BTW KBud is Arma's default model for the outside toilet smile_o.gif

Probably you are right, i think that the doors will work after get binarized to ArmA ODOL format. Unfortunatelly that tool isn't available yet, and OFP ODOL don't work with ArmA.

Share this post


Link to post
Share on other sites

I forgot to say, I updated the config to this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class cfgVehicles

       {

       class House;

       class MyHouse : House

               {

               scope=2;

               displayName="My House";

               model = "\ca\buildings\Misc\KBud";

               animated = 1;

               class AnimationSources

                       {

                       class Dvere1

                               {

                               source = "user";

                               animPeriod = 6;

                               initPhase=0;

                               };

                       };

               };

       };

Not sure if it needs to be binarized? Especially when you take a look at this on the wiki:

ODOL v40 File Format

And this older version:

P3D File Format - ODOLV40

There's plenty in there that you can't do with O2. Model configs are not really my thing, so perhaps someone can work out whats missing for buildings?

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  

×