PDA

View Full Version : Danimations



Soul_Assassin
Oct 22 2002, 17:29
I don't have anywhere to host this so is it ok to post here?

Ok so now you're wondering: "how can i get the doors on my Uh-1 to slide open?" or "how can I open the bomb bay doors on my b52 bomber?", to tell you the truth its not that hard it's just a game of selection names, memory points and brains.

PART 1

First of all for examples sake I've created this little model of a windmill thingy. Now I want to make the rotor part rotate whenever I comeup to it and in my menu press "Rotate windmill". See picture here (http://members.lycos.co.uk/internalediting/files/anim1.jpg).

now we need to name that part so the game recognises it. Ok we have to name it something that we will remember:

Select the object that will be animated and right-click in the selections list, choose NEW. Type windmill as the selection name.

Now we move to the Memory LOD where we have to create two points that will define the axis' around which the object will rotate. Create the points by pressing Insert and place them as shown here (http://members.lycos.co.uk/internalediting/files/anim2.jpg).

Select both and make a new selection called osa windmill.
Now everything is set and everything that is left is to add the following code into the CfgVehicles class in the config.cpp.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">
class All {};
class Static: All {};
class Building: Static {};
class NonStrategic: Building {};
class House: NonStrategic {};
class windmill: House
{
  animated=1;
  model="path to model.p3d";
  displayName="Windmill";
  class Animations
  {
     class animWindmill
  {
      angle0=0
      angle1="2  *  3.1415926"; // 2 * Pi
      multiplyer=20;
      type="rotation";
      animPeriod=1;
      selection="windmill"; // this is the selection we named in resolution LOD
      axis="osa windmill"; //the points selection acting as axis
  };
  };
[/QUOTE]<span id='postcolor'>

Now you want to add that function to your menu everytime you walk up to the windmill. Just after that add this code:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">
class UserAction
{
  class rotateWindmill
  {
      displayName="Rotate windmill";
      positon="osa windmill";
      radius=10; //how far from the object u gotta be to be able to activate it.
      condition="this     animationPhase ""windmill"" < 0.5";
      statement="this animate [""animWindmill"", 1]";
   };
};
[/QUOTE]<span id='postcolor'>

save, Suff and play http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/smile.gif
So you see its really not that hard, now I hope I dont have to tell you how to use that for more complex stuff I&#39;m sure you can figure that out...

Have a nice time plain with it.

Soul_Assassin
Oct 22 2002, 21:13
Please post here any suggestion, aditions or corrections.

Crassus
Oct 24 2002, 10:20
Is there a way to define an exact point on the object at which, when the player reaches that exact point, the action will be added to the player&#39;s menu? Using the Antonov add-on as an example, "Get in as pilot" shows up only when the player is at the left front of the fuselage of the aircraft? Is this something specific only to vehicles, or may I define a specific point or place on objects as well?

Soul_Assassin
Oct 24 2002, 10:24
The thing you refer to is a memory point "pos driver" in memory LOD, its already predefined but in my example the distance is defined through the "radius = "";" parameter in the UserAction class.

NAA_Us_Marine
Nov 2 2002, 02:07
Whats is the animation type for a sliding animation.

A.W.O.L
Nov 2 2002, 10:04
Yeah are u sure u can make objects properly slide, so u could make for example and elevator or sliding doors like u said?

And csn u define the exact pint at which a animation can be triggered, not just in the radius but so u could put point away from animation - example:

A prison door - u dont want area u have to be to open it right near the object cause then u could open it from both sides - even if u were in prison.

U would want it on a control panel somehwere else - is that possible?

Soul_Assassin
Nov 2 2002, 11:25
*This is not tested

In O2 in memory LOD put the point where u want to trigger call it "pos openmydoor" or "pos whateverulike" then in config.cpp in part:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class UserAction
{
class rotateWindmill
{
displayName=&#34;Rotate windmill&#34;;
positon=&#34;osa windmill&#34;;
radius=10; //how far from the object u gotta be to be able to activate it.
condition=&#34;this animationPhase &#34;&#34;windmill&#34;&#34; &#60; 0.5&#34;;
statement=&#34;this animate &#91;&#34;&#34;animWindmill&#34;&#34;, 1&#93;&#34;;
};
};

[/QUOTE]<span id='postcolor'>

in position put the "pos whateverulike" and set the radius. Tell me if it worked

Gridmaster
Nov 2 2002, 12:29
so at my place it doesnt work because of v1.46 took long but found the solution. but im still not able to find the "delete post"-button http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif

NAA_Us_Marine
Nov 2 2002, 18:31
I mean how can i make a sliding door not just a rotating thing i have done it many times but i want the whole door just to slide left you right if you know what i mean like when you define the animation in the cpp theres the thing that says

type="rotation";

well is there like type sliding or something so doesn anyone know this.

Soul_Assassin
Nov 2 2002, 19:26
no other type than rotation is availiable right now

Matthijs
Nov 3 2002, 00:12
Would it be possible to do this on parts of a gun?

I want my ammo to rotate through the gun, like in OFP Taiwan&#39;s machineguns. Can this be used to do that at about 1,2 revolutions per second?

Soul_Assassin
Nov 3 2002, 10:13
Yes it is possible, and has been demonstrated on several ocasions. Give me a vouple of hours and i will get back at u with how to do it.

Matthijs
Nov 3 2002, 16:05
Oh, YESYESYESYES &#33;&#33;&#33;&#33;

PLEASE&#33;&#33;&#33;


http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/smile.gif


I want to let the "ammo belt" (actually a circle) to rotate VERY fast when firing. It&#39;s currently using the "revolve" animation, which rotates the object once for each magazine emptied.


Also see [ THIS ] (http://www.flashpoint1985.com/cgi-bin/ikonboard301/ikonboard.cgi?act=ST;f=4;t=22067) thread.


I would be very thankful for your help&#33;

NAA_Us_Marine
Nov 3 2002, 22:22
What about sliding doors how can you do that.
I have seen them on alot of people making helo&#39;s these days.

Matthijs
Nov 4 2002, 07:51
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (NAA_Us_Marine @<hidden> Nov. 04 2002,00:22)</td></tr><tr><td id="QUOTE">What about sliding doors how can you do that.
I have seen them on alot of people making helo&#39;s these days.[/QUOTE]<span id='postcolor'>
I didn&#39;t check, but my guess is that it&#39;s a rotation with a very far point as the axis.

Colonel_Klink
Nov 4 2002, 10:07
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Matthijs @<hidden> Nov. 04 2002,09:51)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (NAA_Us_Marine @<hidden> Nov. 04 2002,00:22)</td></tr><tr><td id="QUOTE">What about sliding doors how can you do that.
I have seen them on alot of people making helo&#39;s these days.[/QUOTE]<span id='postcolor'>
I didn&#39;t check, but my guess is that it&#39;s a rotation with a very far point as the axis.[/QUOTE]<span id='postcolor'>
Yes it is. On the Huey I&#39;m building for the Falklands mod the pivot point for the port door is on the starboard side and the starboard pivot on the port side. You have to experment with distances. the closer the pivot the smaller turning circle etc.
Heres the animation code I used:
// Door Animation
class Animations
{
class PrtDoor
{
type="rotation";
animPeriod=3;
selection="prtdoor";
axis="osa_prtdoor";
angle0=0;
angle1=0.2;
};
class StabDoor
{
type="rotation";
animPeriod=3;
selection="Stabdoor";
axis="osa_stabdoor";
angle0=0;
angle1=-0.2;
};
};
class UserActions
{
class OpenPrtdoor
{
displayName="Open Port Door";
position="osa_L";
radius=3;
condition="this animationPhase ""prtdoor"" < 0.5";
statement="this animate [""prtdoor"", 1]";
};
class ClosePrtdoor
{
displayName="Close Port Door";
position="osa_L";
radius=3;
condition="this animationPhase ""prtdoor"" >= 0.5";
statement="this animate [""prtdoor"", 0]";
};
class Openstabdoor
{
displayName="Open Starboard Door";
position="osa_R";
radius=3;
condition="this animationPhase ""Stabdoor"" < 0.5";
statement="this animate [""Stabdoor"", 1]";
};
class CloseStabdoor
{
displayName="Close Starboard Door";
position="osa_R";
radius=3;
condition="this animationPhase ""Stabdoor"" >= 0.5";
statement="this animate [""Stabdoor"", 0]";
};


};

Door activation position points and radius:
osa_R and osa_L are the position points in the memory lod where you want the doors to be activated from. ie osa_R is by the starboard door and osa_L by the port door. radius=3 is the distance from those points. Note: Make the radius big enough so it includes the pilot or copilot seat area for the respective sides.

Soul_Assassin
Nov 4 2002, 17:32
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Colonel_Klink @<hidden> Nov. 04 2002,12:07)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Matthijs @<hidden> Nov. 04 2002,09:51)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (NAA_Us_Marine @<hidden> Nov. 04 2002,00:22)</td></tr><tr><td id="QUOTE">What about sliding doors how can you do that.
I have seen them on alot of people making helo&#39;s these days.[/QUOTE]<span id='postcolor'>
I didn&#39;t check, but my guess is that it&#39;s a rotation with a very far point as the axis.[/QUOTE]<span id='postcolor'>
Yes it is. On the Huey I&#39;m building for the Falklands mod the pivot point for the port door is on the starboard side and the starboard pivot on the port side. You have to experment with distances. the closer the pivot the smaller turning circle etc.
Heres the animation code I used:
// Door Animation
class Animations
{
class PrtDoor
{
type="rotation";
animPeriod=3;
selection="prtdoor";
axis="osa_prtdoor";
angle0=0;
angle1=0.2;
};
class StabDoor
{
type="rotation";
animPeriod=3;
selection="Stabdoor";
axis="osa_stabdoor";
angle0=0;
angle1=-0.2;
};
};
class UserActions
{
class OpenPrtdoor
{
displayName="Open Port Door";
position="osa_L";
radius=3;
condition="this animationPhase ""prtdoor"" < 0.5";
statement="this animate [""prtdoor"", 1]";
};
class ClosePrtdoor
{
displayName="Close Port Door";
position="osa_L";
radius=3;
condition="this animationPhase ""prtdoor"" >= 0.5";
statement="this animate [""prtdoor"", 0]";
};
class Openstabdoor
{
displayName="Open Starboard Door";
position="osa_R";
radius=3;
condition="this animationPhase ""Stabdoor"" < 0.5";
statement="this animate [""Stabdoor"", 1]";
};
class CloseStabdoor
{
displayName="Close Starboard Door";
position="osa_R";
radius=3;
condition="this animationPhase ""Stabdoor"" >= 0.5";
statement="this animate [""Stabdoor"", 0]";
};


};

Door activation position points and radius:
osa_R and osa_L are the position points in the memory lod where you want the doors to be activated from. ie osa_R is by the starboard door and osa_L by the port door. radius=3 is the distance from those points. Note: Make the radius big enough so it includes the pilot or copilot seat area for the respective sides.[/QUOTE]<span id='postcolor'>
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE"> Note: Make the radius big enough so it includes the pilot or copilot seat area for the respective sides.
[/QUOTE]<span id='postcolor'>

Hmm animations can&#39;t be triggered in-flight anyway so y really bother?

@<hidden>

Can you please post yuo config here?

PS: R u Dutch? If yes I live in Holland http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/smile.gif

Matthijs
Nov 4 2002, 18:03
Eyyyyyy&#33;&#33;&#33;&#33;

IF IT AIN&#39;T DUTCH, IT AIN&#39;T MUCH &#33;&#33;&#33; http://www.tacforums.org/forum/ikonboard311/non-cgi/emoticons/marnsmile.gif

I live in Gorinchem. And you?


There&#39;s a lot I remarked out. But I guess you can see what I did.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
// THE FN MAG/MAG58/GMPG/M240/C6 was created by W.M. Crielaard
// url&#58; http&#58;//www.bbemariniers.net
// email&#58; webmaster@<hidden>
//
// This addon for Operation Flashpoint is shareware and can be distributed under the
// following conditions&#58;
//
// If you want to use some or all of the content of this addon for your own work,
// send a request to webmaster@<hidden>
//
// - Non commercial distribution only
// - Modified versions may never be packaged with the original versions
// - Modified versions may never have the same class names the original versions
// - Original packages may not be modified in any way
//
// Model&#92;Skinning&#92;Importing by Willem-Matthijs Crielaard
// config.cpp by Willem-Matthijs Crielaard
// Original optics by OFP Taiwan workshop
// Military consultancy by &#34;Assault&#91;CAN&#93;&#34; Tyler
// V1.0

class CfgPatches
{
class KM_Mod
{
units&#91;&#93; = {};
weapons&#91;&#93; = {KM_FNMAG};
requiredVersion = 1.2;
};
};

class CfgModels
{

class Default
{
sections&#91;&#93; = {};
sectionsInherit=&#34;&#34;;
};
class Weapon&#58; Default{};
class km_fnmag&#58; Weapon
{
sections&#91;&#93; = {&#34;zasleh&#34;};
};
class km_fnmagoptics&#58; Weapon
{
sections&#91;&#93; = {&#34;zasleh&#34;};
};
};

//class CfgAmmo
//{
// class Default {};
// class BulletSingle&#58; Default {};
// class Bullet7_6&#58; BulletSingle {};
// class KM_762NATO&#58; Bullet7_6
// {
// airLock=1;
// hit=10;
// cost=5;
// tracerColor&#91;&#93;={1,0.25000,0.12500,0.5};
// minRange=1;
// minRangeProbab=0.9;
// midRange=500;
// midRangeProbab=0.75;
// maxRange=1000;
// maxRangeProbab=0.25;
// };
//};

////////////////////////////////////////////////////////
// FNMAG + AMMO DEFINITION
////////////////////////////////////////////////////////

class CfgWeapons
{
class Default {};
class MGun &#58; Default {};
class MachineGun7_6&#58; MGun {};
class MachineGun7_6Manual&#58; MachineGun7_6 {};
class KM_FNMAG&#58; MachineGun7_6Manual
{
displayName=&#34;FN MAG&#34;;
weaponType=1;
model=&#34;&#92;km_fnmag&#92;km_fnmag.p3d&#34;;
picture=&#34;&#92;km_fnmag&#92;fnmaginv.paa&#34;;
scopeWeapon = 2;
scopeMagazine = 2;
modelOptics=&#34;&#92;km_fnmag&#92;km_fnmagoptics.p3d&#34;;
optics = true;
opticsFlare=0;
opticsZoomMin=0.35;
opticsZoomMax=0.35;
displayNameMagazine=&#34;FN MAG ammo box&#34;;
shortNameMagazine=&#34;FN MAG ammo&#34;;
reloadSound&#91;&#93;={&#34;&#34;,1,1};
reloadMagazineSound&#91;&#93;={&#34;&#92;km_fnmag&#92;fnmagreload.wav&#34;,db-70,1};
count=100;
magazines&#91;&#93; = {&#34;KM_FNMAGMag&#34;};

revolving=&#34;ammobelt&#34;;
revolvingAxis=&#34;ammobelt_ax&#34;;
revolvingspeed=0.1;

modes&#91;&#93; = {&#34;gas1&#34;, &#34;gas2&#34;, &#34;gas3&#34;};
class gas1
{
ammo=Bullet7_6W;
// ammo=KM_762NATO;
multiplier=1;
burst=1;
displayName=&#34;FN MAG, gas&#58;1&#34;;
sound&#91;&#93;={&#34;&#92;km_fnmag&#92;fnmag.wav&#34;,db10,1};
soundContinuous=0;
reloadTime=0.085000;

ffCount=6;
ffMagnitude=0.500000;
ffFrequency=11;

dispersion=0.002500;
aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst
// aiDispersionCoefY=2.000000;
maxLeadSpeed=300;

recoil=&#34;mgunBurst3&#34;;
// recoil=&#34;riffleSingle&#34;;
autoFire = true;
useAction= false;
useActionTitle=&#34;&#34;;
aiRateOfFire=0;
aiRateOfFireDistance=0;
};
class gas2
{

ammo=Bullet7_6W;
// ammo=KM_762NATO;
multiplier=1;
burst=1;
displayName=&#34;FN MAG, gas&#58;2&#34;;
sound&#91;&#93;={&#34;&#92;km_fnmag&#92;fnmag.wav&#34;,db10,1};
soundContinuous=0;
reloadTime=0.070000;

ffCount=6;
ffMagnitude=0.500000;
ffFrequency=11;

dispersion=0.002500;
aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst
// aiDispersionCoefY=2.000000;
maxLeadSpeed=300;

recoil=&#34;mgunBurst3&#34;;
// recoil=&#34;riffleSingle&#34;;
autoFire = true;
useAction= false;
useActionTitle=&#34;&#34;;
aiRateOfFire=0;
aiRateOfFireDistance=0;
};
class gas3
{

ammo=Bullet7_6W;
// ammo=KM_762NATO;
multiplier=1;
burst=1;
displayName=&#34;FN MAG, gas&#58;3&#34;;
sound&#91;&#93;={&#34;&#92;km_fnmag&#92;fnmag.wav&#34;,db10,1};
soundContinuous=0;
reloadTime=0.060000;

ffCount=6;
ffMagnitude=0.500000;
ffFrequency=11;

dispersion=0.002500;
aiDispersionCoefX=5.000000; // dispersion used to simulate horizontal burst
// aiDispersionCoefY=2.000000;
maxLeadSpeed=300;

recoil=&#34;mgunBurst3&#34;;
// recoil=&#34;riffleSingle&#34;;
autoFire = true;
useAction= false;
useActionTitle=&#34;&#34;;
aiRateOfFire=0;
aiRateOfFireDistance=0;
};
};
class KM_FNMAGMag &#58; KM_FNMAG
{
picture=&#34;&#92;km_fnmag&#92;fnmagmaginv.paa&#34;;
};
};

class CfgVehicles
{
class All{};
class AllVehicles &#58; All{};
class Land &#58; AllVehicles{};
class Man &#58; Land{};
class Soldier &#58; Man{};
class SoldierWB &#58; Soldier{};
class SoldierWMG&#58; SoldierWB {}

class KM_Soldier_FNMAG &#58; SoldierWMG
{
displayName=&#34;Machinegunner &#40;FN MAG&#41;&#34;;
weapons&#91;&#93;={&#34;KM_FNMAG&#34;,&#34;Binocular&#34;,&#34;Throw&#34;,&#34;Put&#34;};
magazines&#91;&#93;={ &#34;KM_FNMAGMag&#34;, &#34;KM_FNMAGMag&#34;, &#34;KM_FNMAGMag&#34;, &#34;KM_FNMAGMag&#34;, &#34;KM_FNMAGMag&#34; };
};
};
class CfgGroups
{
class KM_Mod
{
name=&#34;Korps Mariniers mod&#34;;
class KMequipment
{
name=&#34;NL KMARNS equipment&#34;;
class KM_FNMAG_Soldier
{
name=&#34;Machinegunner &#40;FN MAG&#41;&#34;;
class Unit0
{
side=1;
vehicle=&#34;KM_Soldier_FNMAG&#34;;
rank=&#34;Private&#34;;
position&#91;&#93;={0,2,0};
};
};
};
};
};
[/QUOTE]<span id='postcolor'>

Soul_Assassin
Nov 4 2002, 18:56
I live in Den Haag and the queen is my neighbour on Noordeinde http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/smile.gif but im not dutch though but lived here for 7 years.

now about the rotation no matter what I try the speed satys the same http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/sad.gif hmm im gonna try some more but i promise nothing

Frugo_PL
Nov 4 2002, 19:36
I see that there is an animations called "revolve":

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
// From Matthijs&#39;s Config.cpp

revolving=&#34;ammobelt&#34;; // selection to ratate
revolvingAxis=&#34;ammobelt_ax&#34;; //axis for rotation
revolvingspeed=0.1; // the speed of the rotation &#40;rotation/x time in secs.&#41;

[/QUOTE]<span id='postcolor'>

Correct me if I&#39;m wrong.

Soul_Assassin
Nov 4 2002, 19:53
when u revolve it means u rotate http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/tounge.gif

Matthijs
Nov 4 2002, 21:00
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Frugo_PL @<hidden> Nov. 04 2002,21:36)</td></tr><tr><td id="QUOTE">I see that there is an animations called "revolve":

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
// From Matthijs&#39;s Config.cpp

revolving=&#34;ammobelt&#34;; // selection to ratate
revolvingAxis=&#34;ammobelt_ax&#34;; //axis for rotation
revolvingspeed=0.1; // the speed of the rotation &#40;rotation/x time in secs.&#41;

[/QUOTE]<span id='postcolor'>

Correct me if I&#39;m wrong.[/QUOTE]<span id='postcolor'>
Sharp to notice&#33;  http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/tounge.gif

My question was: "(...) to do that at about 1,2 revolutions per second?"

And that&#39;s not possible with the "revolve" animation. The revolve animation rotates once per magazine emptied, to be used for a revolver. (duh...)


Oh, and the "REVOLVINGSPEED" does nothing. I just made that one up myself, tried to see if it had any effect, with different values. (unsurprisingly none whatsoever)
http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/sad.gif


I also tried to find something in the CPP for the Vulcan, but again... nothing useful.

A.W.O.L
Nov 4 2002, 22:01
Ok this is the config from GFX&#39;s Minigun - has very fast revolving animation - does aything in this helps or it it much the same as vulcan?

// type scope
#define private 0
#define protected 1
#define public 2

#define WeaponNoSlot 0// dummy weapons
#define WeaponSlotPrimary 1// primary weapons
#define WeaponSlotSecondary 16// secondary weapons
#define WeaponSlotItem 256// items
#define WeaponSlotBinocular 4096// binocular
#define WeaponHardMounted 65536

class CfgPatches
{
class hh_minigun_Soldier {units[] = {hh_minigun_Soldier}; weapons[] = {}; requiredVersion = 1.75; };
class hh_minigun {units[] = {hh_minigun}; weapons[] = {}; requiredVersion = 1.75; };
};


class CfgModels
{
class Default{};
class Weapon: Default{};
class minigun: Weapon{};
};

class CfgAmmo
{
class Default {};
class BulletSingle : Default {};
class hh_minigunAmmo: BulletSingle {
hit=20;indirectHit=0.1;indirectHitRange=0.1;
minRange=20;minRangeProbab=0.80;
midRange=500;midRangeProbab=0.95;
maxRange=3000;maxRangeProbab=0.05;
cost=30;
};
};

class CfgWeapons

{
class Default{};
class MGun: Default{};
class MachineGun7_6: MGun{};
class MachineGun7_6Manual: MachineGun7_6{};
class PK: MachineGun7_6Manual{};
class hh_minigun: PK
{
count=100;
model="&#92;minigun&#92;minigun";
modelOptics="optika_PK";
displayName="M134";
displayNameMagazine="M134 Magazine";
shortNameMagazine="M134";
drySound[]={"weapons&#92;m16dry",0.000316,1};
ammo=hh_minigunAmmo;
initSpeed=600;
reloadTime=0.0500000;
magazineReloadTime=0.0500000;
autoReload=1;
dispersion=0.0015;
sound[]={"&#92;minigun&#92;minigun.wav",db0,1};
soundContinuous=0;
maxLeadSpeed=865;
picture="&#92;minigun&#92;w_minigun.paa";
revolving="barrels";
revolvingAxis="barrels_axis";

};

};
class CfgNonAIVehicles
{
class ProxyWeapon {};
class Proxyhh_minigun: ProxyWeapon {};
};

//Vehicle Settings

class CfgVehicles
{
class All{};
class AllVehicles:All{};
class Land:AllVehicles{};
class Man:Land{};
class Soldier:Man{};
class SoldierGB:Soldier{}
class hh_minigunSoldier: SoldierGB
{
//access=1;
displayName="Soldier (M134)";
weapons[]={"hh_minigun"};
magazines[]={"hh_minigun","hh_minigun","hh_minigun","hh_minigun&quo
t;,"hh_minigun"};

};

};

Frugo_PL
Nov 4 2002, 23:19
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">has very fast revolving animation[/QUOTE]<span id='postcolor'>

Is that the minigun from the bunker pack 5? If it is, then you have a weird definition of "fast". It revolves once per 100 shots&#33; It&#39;s VERY slow&#33; At least it revolves.

Colonel_Klink
Nov 5 2002, 06:11
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">
Note: Make the radius big enough so it includes the pilot or copilot seat area for the respective sides.[/QUOTE]<span id='postcolor'>

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">
Hmm animations can&#39;t be triggered in-flight anyway so y really bother?[/QUOTE]<span id='postcolor'>

True, but the reason the radius includes the pilot and copilot is to be able to close the doors once you board the helo. one way of getting the doors to open during flight would be to script them and use the Fire command to trigger a script inside the pbo.

Matthijs
Nov 5 2002, 08:01
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Colonel_Klink @<hidden> Nov. 05 2002,08:11)</td></tr><tr><td id="QUOTE">True, but the reason the radius includes the pilot and copilot is to be able to close the doors once you board the helo. one way of getting the doors to open during flight would be to script them and use the Fire command to trigger a script inside the pbo.[/QUOTE]<span id='postcolor'>
Hey, that would be a neat idea. Change the gunner or commander into a loadmaster that can operate the doors.

All you need then, is a script that will disable the getin and getout when the doors are closed.

Colonel_Klink
Nov 6 2002, 05:47
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">All you need then, is a script that will disable the getin and getout when the doors are closed.[/QUOTE]<span id='postcolor'>
Now this is thinking http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/smile.gif Why not script the getin getout commands to open and close the doors BEFORE the animation to getin/out takes place. Don&#39;t know if it could be done, but it is worth experimenting with.

Lt. Jimbo
Nov 7 2002, 00:36
Is there an "animation" that makes textures disappear like "zasleh", but will allow the script define when it disappears or when it reappears? Thanks&#33;

Nov 7 2002, 21:22
Moving to Addon Config & Scripting http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/smile.gif

Oberon3d
Nov 7 2002, 23:32
Can you do three objects animate in diferent axis at the same time with one action?

Lt. Jimbo
Nov 8 2002, 20:29
how does the thing work on vehicles (like the M113)?

der bastler
Nov 9 2002, 12:13
Would it be possible to create a "real" bipod with animations? I mean, perhaps it&#39;s possible to define an animation on weapons. But a bipod has a function (supports barrel; mg3: helps compensating the recoil), so how can I simulate increased accuracy if </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">this animationPhase &#34;mybipodanimation&#34; &#62; 0.9[/QUOTE]<span id='postcolor'> is true?

Is it possible to change variables of my weapon class (e.g. dispersion) "on the run" (i.e. ingame)?

Or perhaps do some kind of work-around? If I remember the OFP engine correctly accuracy...
 ...is increased if you lay down;
 ...is decreased after running around.
*?*

Konyak-2
Nov 9 2002, 14:53
Hope this is the thread to get an answer to my dilemma: I have a user action defined and a statement line that says what animation to perform. This is simple when there is only one animation, but I have four parts that animate together.

Think the line looks like this now:
statement = "this animate [""OpenDoor"", 1]";

How would I make it animate OpenWindow and another animation in the same instant?? What is the correct syntax? Or do I need to use a more complex approach, like event handlers?

Hope someone knows, it&#39;s the last thing I need to get my animated Antonov out there.

thanks,

Konyak

der bastler
Nov 9 2002, 19:39
Perhaps you could use multiple function calls?
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
statement = &#34;this animate &#91;&#34;&#34;OpenDoor&#34;&#34;, 1&#93;;this animate &#91;&#34;&#34;OpenWindow&#34;&#34;, 1&#93;;this animate &#91;&#34;&#34;AnotherAnimation&#34;&#34;, 1&#93;&#34;;
[/QUOTE]<span id='postcolor'>


btw: Is it possible to animate the axis (memory points) of another animation?

(industrial robot -> rotate upper_arm and axis_forearm around axis_upper_arm; rotate forearm around axis_forearm)

brsseb
Nov 9 2002, 22:52
Hi

Im working on a comanche helicopter and is has some of its rockets hidden in the hull behind two doors on each side. When the user switches to the turret gun infront, the rocket panels close automatically to give the aircraft better stealhcharacteristisks, and open again when rockets are selected.

Is this possible to do in a script or something. Having these two doors open when a certain weapon is selected and closed when changed? This must be done quick and fully automatically.

brsseb (ofp.info/brsseb)

Konyak-2
Nov 10 2002, 12:37
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (der bastler @<hidden> Nov. 09 2002,21:39)</td></tr><tr><td id="QUOTE">Perhaps you could use multiple function calls?
</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
statement = &#34;this animate &#91;&#34;&#34;OpenDoor&#34;&#34;, 1&#93;;this animate &#91;&#34;&#34;OpenWindow&#34;&#34;, 1&#93;;this animate &#91;&#34;&#34;AnotherAnimation&#34;&#34;, 1&#93;&#34;;
[/QUOTE]<span id='postcolor'>


btw: Is it possible to animate the axis (memory points) of another animation?

(industrial robot -> rotate upper_arm and axis_forearm around axis_upper_arm; rotate forearm around axis_forearm)[/QUOTE]<span id='postcolor'>
I tried that already, it comes up with an error: Statement already defined. Looks like it doesn&#39;t like many animations per statement. My hope was that I had the syntax wrong, or tha I&#39;d need to create an event and then define an eventhandler that activates the other animations from the first one.

Animating axis points could be a problem, but I definately need to try that. My guess is that it&#39;s not possible, because it&#39;s a Memory lod point, not a resolution lod point. I don&#39;t think the game engine will animate anything in the memory lod, only fetch information from it. But worth the try. Might also confuse the engine because you&#39;d call the point "axis upper arm" and then make another selection for it called "lower arm", that is using an axis point in the same lod called "axis lower arm" http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif

Konyak

der bastler
Nov 10 2002, 13:15
Well, some time ago I animated the roadway lod (should become a lifting ramp for cars; but you can&#39;t lift an empty car: it ignores the roadway lod), perhaps memory lod is possible, too&#33;

Idea for multiple animation calls: try to execute a skript containing all necessary "this animate [that]" from inside an add-on.
(statement = "[this] exec [""animationcalls.sqs""]")

DragoFire
Dec 7 2002, 09:49
A question for someone to help me out with.

I&#39;ve got the animation for the landing-gear done and working the way I want (minus the placement of the axis).

And I&#39;ve got the memory locations done for a second animation in the p3d file. But how do I get this second animation to work from within the action menu?

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class Animations
{class Ltouterwing
{type=&#34;rotation&#34;;
animPeriod=2;
selection=&#34;lt outerwing&#34;;
axis=&#34;lt wing axis&#34;;
angle0=0;
angle1=-1.55;};
class Rtouterwing
{type=&#34;rotation&#34;;
animPeriod=2;
selection=&#34;rt outerwing&#34;;
axis=&#34;rt wing axis&#34;;
angle0=0;
angle1=1.55;};
class LtGear
{type=&#34;rotation&#34;;
animPeriod=2;
selection=&#34;lt gear&#34;;
axis=&#34;axis gear lt&#34;;
angle0=0;
angle1=-1.55;};
class RtGear
{type=&#34;rotation&#34;;
animPeriod=2;
selection=&#34;rt gear&#34;;
axis=&#34;axis gear rt&#34;;
angle0=0;
angle1=-1.55;};
class NoseGear
{type=&#34;rotation&#34;;
animPeriod=2;
selection=&#34;nose gear&#34;;
axis=&#34;axis gear nose&#34;;
angle0=0;
angle1=-2.2;};};
class EventHandlers
{gear = &#34;if &#40;_this Select 1&#41; then {&#40;_this Select 0&#41; Animate &#91;&#34;&#34;LtGear&#34;&#34;, 0&#93;; &#40;_this Select 0&#41; Animate &#91;&#34;&#34;RtGear&#34;&#34;, 0&#93;; &#40;_this Select 0&#41; Animate &#91;&#34;&#34;NoseGear&#34;&#34;, 0&#93;} else {&#40;_this Select 0&#41; Animate &#91;&#34;&#34;LtGear&#34;&#34;, 1&#93;; &#40;_this Select 0&#41; Animate &#91;&#34;&#34;RtGear&#34;&#34;, 1&#93;; &#40;_this Select 0&#41; Animate &#91;&#34;&#34;NoseGear&#34;&#34;, 1&#93;}&#34;;
foldwings = &#34;if &#40;_this Select 1&#41; then {&#40;_this Select 0&#41; Animate &#91;&#34;&#34;Ltouterwing&#34;&#34;, 0&#93;; &#40;_this Select 0&#41; Animate &#91;&#34;&#34;Rtouterwing&#34;&#34;, 0&#93;} else {&#40;_this Select 0&#41; Animate &#91;&#34;&#34;Ltouterwing&#34;&#34;, 1&#93;; &#40;_this Select 0&#41; Animate &#91;&#34;&#34;Rtouterwing&#34;&#34;, 1&#93;}&#34;;
};[/QUOTE]<span id='postcolor'>

I hope someone can help me with this.

DragoFire

TYsiEK
Dec 7 2002, 10:13
How to make rotors animation ? I mean - when i press to some action the rototrs is active. But it&#39;s rotating every time, not one rotate.

Sorry for my bad English.

granQ
Apr 18 2003, 15:13
Can someone say how to make for like a weapon recoil?.. How to put the axies, good "angle" value, distance with axies and such? Been working all day and tested so much but always spinns and stuff.. (ended up making a gattling gun http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/wink.gif ) but i want to make a recoil.