Jump to content
Sign in to follow this  
granQ

ArmA: Custom animted "door/ramp"

Recommended Posts

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

{

type ="rotation";

initPhase=1;

source = "user";

animPeriod =3;

sourceAddress = "clamp";

selection ="Door";

axis ="osa Door";

angle0 =0;

angle1 =-1.574387;

};

this works perfectly ingame, but generats a error about the "source="user". So what can I replace it with? I tried "door1", then no error message but then the animation wasnt played, just open/close without the transation.

Share this post


Link to post
Share on other sites
Guest RKSL-Rock
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class RC_door

{

type ="rotation";

initPhase=1;

source = "user";

animPeriod =3;

sourceAddress = "clamp";

selection ="Door";

axis ="osa Door";

angle0 =0;

angle1 =-1.574387;

};

this works perfectly ingame, but generats a error about the "source="user". So what can I replace it with? I tried "door1", then no error message but then the animation wasnt played, just open/close without the transation.

I've got the same problem... now form my research we need to define a custom animations source which we're told in the BIKI we can do like so:

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

{

class MainRamp

{

  source = "user"; //The controller is defined as a user animation.

  animPeriod = 6;  //The animation period used for this controller.

  initPhase=1;     //Initial phase when object is created.

};

};

The problem ive got is that it doenst seem to work ...relocating the code in config  from the "root" to a child class of any of the others classes doesn't seem to work either?!

Share this post


Link to post
Share on other sites
Guest RKSL-Rock

Ok found the problem, to get custom animationsources defined you need to add a line into the class definations:

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

class Helicopter;

class UH60MG: Helicopter

{

class NewTurret;

class Turrets;

class AnimationSources;  // Add this

};

class RKSL_A_MerlinHC3_MG: UH60MG

And then define the source as part of your CFGVEHICLES.

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

{

class Ramp // Should be the same as your selection name.

{

    source = "user"; //The controller is defined as a user animation.

    animPeriod = 6;  //The animation period used for this controller.

    initPhase=0;     //Initial phase when object is created. 0 = CLOSED

};

};

Then in your CFGANIMATIONS you need to reference the custom animationsource:

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

{

type ="rotation";

sourceAddress="clamp";

source ="user";

initPhase=1;

animPeriod =6;

selection ="RAMP";

axis ="AXIS_RAMP";

angle0 =0;

angle1 =-.802848;

};

NOTE Your custom animationsource should be named the same as the selection you want to animate.

Share this post


Link to post
Share on other sites

thanks alot, see if I will update the Be 32.

Share this post


Link to post
Share on other sites

I also need help with custom animations but even after following your advice i can't get them to work, can anyone help?

Share this post


Link to post
Share on other sites
Guest RKSL-Rock
I also need help with custom animations but even after following your advice i can't get them to work, can anyone help?

What do you need?

Share this post


Link to post
Share on other sites

I'm having problems with the axis, i can't get a object to rotate on a certain axis. it rotates, just along a unknown axis...

Share this post


Link to post
Share on other sites
Guest RKSL-Rock
I'm having problems with the axis, i can't get a object to rotate on a certain axis. it rotates, just along a unknown axis...

ArmA isnt like OFP anymore you have the option to specify the axis type, either:

RotationX

RotationY

RotationZ

You could try doing that - or you may have a problem with your memory points. Check to make sur eyou have only 2 selected.

Howtoanimmodel_axes.jpg

Use the diagram to work out which axis to us and then alter your config to suit.

Share this post


Link to post
Share on other sites
Guest

If i wanted a simple door to do the samething but set up in a archway.... would i need to make the class a helicoptor? like in your example... just asking cause its not a vehicle but a regular object

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  

×