Jump to content
Sign in to follow this  
MehMan

Su-25 CCIP possible?

Recommended Posts

ok looks like a source it not doable. or atleast i cant find a way to do it. maybe someone else got the knowhow.

i been unpboing about all files. looked in about all of them. maybe i missed suff who know. there is alot of files tounge2.gif

so looks like the only way is to use dialog or titleRsc

is 3d dialog supported in arma? that way we could make a squear and align it with the ingame hud. and it would look more realistic than 2d dialog such as the ils is..

Share this post


Link to post
Share on other sites
ok looks like a source it not doable.

...

so looks like the only way is to use dialog or titleRsc

...

is 3d dialog supported in arma?

The source, as I said above, will have to be custom calculated.

The answer isn't in the PBO's, it's in MehMan beautiful picture above.  A good math's equation will provide the solution to the problem using the vectors from the aircraft's current state.  ArmA provides us with more vector information than OFP did, which is a blessing.

You can define your own animation sources as easy as pie, and I think these can be used by the HUD.  If not, you could easily script in a faux hud using a couple of faces with a transparent texture.  As I said above, its not the display thats the problem - the problem is we need to come up with a good equation to work out the fallen position of any dropped item.

As near as I can tell, ArmA does not calculate air resistance for the FALLING of an object.  It does however use air resistance for the MANEUVERING of an object.  Because dumb bombs, by definition, don't maneuver - we can safely ignore that for the purposes of the maths calculation.

If I can solve the damn "fire missiles from a memory point" problem I am having, I'll devote some time to coming up with an equation based on the Range of Projectile.

Quote[/b] ]    * g: the gravitational acceleration—usually taken to be 9.81 m/s2 near the Earth's surface

   * -0- the angle at which the projectile is launched

   * v: the velocity at which the projectile is launched

   * y0: the initial height of the projectile

   * d: the total horizontal distance travelled by the projectile

c1da5860501561519415962ddda5e85e.png

So, for example, I think that an object dropped on a straight and level flightpath, at a speed of 360km/h, at an altitude of 100m... should travel a distance of 451.52m before impact (on level ground!wink_o.gif.  However, if the aircraft was heading upwards at a slight angle of 10 degrees, the distance would be 651.94m.

I'll put this equation into Armed Assault and see if I can test the result.

Share this post


Link to post
Share on other sites

Exaclty what I wanted to do, heh!

I'll test to see what value ArmA uses for gravity.

EDIT: ok I'm a bit confused...maybe somebody can help themselves with these values:

The starting point was a soldier x meters in the air from the start of the mission. the time was measured using a sidechat format command and the time command. I did the trials five times to see how it changes. the time is in seconds:

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

4,171

4,163

4,47

4,165

4,462

results:  500m

11,716

11,946

11,823

11,726

11,769

results: 5000m

78.664

(only one test because it took so long)

Ok, taking in account that I sucked at physics, lets say just calculate the velocity out of that, I think that dividing just distance/time will give you average velocity, so we have to take this in account, and as such caavevelocityv.png this comes in account. This page has a lot of calculators.

Now...the results I get vary...a rather lot...

EDIT2:

I think these threads on air friction and arty in OFP might give some clues.

Share this post


Link to post
Share on other sites

icemotoboy the sources i speak of are thise ones.

fixed

linear

rotational

vector

ils

horizon

this sources can be used to animate hud and sections in the cockpit such as altmeter pitchup/down..

Quote[/b] ]The source, as I said above, will have to be custom calculated.
Quote[/b] ]You can define your own animation sources as easy as pie,

we can not just define a new source.. well if we can please tell me how, This sources comes from the game engine itself.

calculation is our main problem offcource.

but i think we need to make this calulations from a script,

Quote[/b] ]...

It does however use air resistance for the MANEUVERING of an object. Because dumb bombs, by definition, don't maneuver - we can safely ignore that for the purposes of the maths calculation.

if you drop a bomb from 100M and the bomb is horizontal you get a totale diffrent time if it was verticale.

when the bomb is droped form 100M horizontal it starts to decent and begin to change vector to a verticale one,,

So no, i dont think we can just ignore it.

Air resistance for pitch is needed to be taken in to account, otherwize it would use the same time to the ground which it doesnt

Share this post


Link to post
Share on other sites

Ugh, ok, something is not right. Somehow ArmA gravity...isn't the right gravity or my calculations are incorrect...

Share this post


Link to post
Share on other sites
Quote[/b] ]we can not just define a new source.. well if we can please tell me how, This sources comes from the game engine itself.

Ummm...

config.cpp:

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

class AnimationSources {

class Wing {

source = "user";

animPeriod = 5;

initPhase = 0;

};

};

model.cfg:

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

{

type="rotation";

source="Wing";

selection="WingL";

axis="WingL_axis";

memory=1;

sourceAddress="clamp";

minValue=0.000000;

maxValue=1.0;

angle0=0;

angle1="rad -40";

};

class WingR

{

type="rotation";

source="Wing";

selection="WingR";

axis="WingR_axis";

memory=1;

sourceAddress="clamp";

minValue=0.000000;

maxValue=1.0;

angle0=0;

angle1="rad 40";

};

Then in code I detect when my plane goes higher than a certain speed, and I adjust the wing using:

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

_speed = _this select 1;

while

{

alive _vehicle;

}

do

{

waitUntil { speed _vehicle >= _speed };

_vehicle animate["WingL",1];

_vehicle animate["WingR",1];

waitUntil { speed _vehicle <= _speed };

_vehicle animate["WingL",0];

_vehicle animate["WingR",0];

};

You can define your own customs sources for animation.

Quote[/b] ]if you drop a bomb from 100M and the bomb is horizontal you get a totale diffrent time if it was verticale.

when the bomb is droped form 100M horizontal it starts to decent and begin to change vector to a verticale one,,

Ummm, again, you'll find that if you drop something in-game from a STATIONARY object - the angle of said object is irrelevant.  The only reason the pitch of the aircraft is important is because of the trajectory that it imparts.  I think you've missed some very basic (and important) aspects of physics in your logic here.

Read through Range of a Projectile that I actually posted above.  Note that there are formula's for taking into account air friction, but this is fairly negligible.

From my experiments, I would say ArmA dealings with objects without applying a strict gravity, and this results in objects tending to "float" or "glide" when dropped.  This works fine for bombs and indeed missiles.  This is also why MehMan is getting strange gravity effects. In a racing game that I was associate producer on, we faked a lot of the physics in this way too because hard gravity calculations cost significant FPS. Its in the best interests of the gamer for the physics to be culled to what is needed to play the core game, rather than sacrificing FPS. Hence, when you try to do something a little out of the ordinary, you can get odd results.

I took the earlier posted OFP script and have gotten it to work fine for the purposes of dropping bombs from a bomber.  I posted it in it's entirety earlier, so people are welcome to use it.  I'm currently using that script as a source to animate a custom reticule for my bombers gunner.

Share this post


Link to post
Share on other sites

@Rocket: nuxil is refering to HUD animation sources and not the sources used in model.cfg for animations. I doubt that these are the same, although I didnt test it.

Share this post


Link to post
Share on other sites
@Rocket: nuxil is refering to HUD animation sources and not the sources used in model.cfg for animations.

It doesn't matter. HUD is just a level of complexity on top of the existing animation system. He mentioned...

Quote[/b] ]this sources can be used to animate hud and sections in the cockpit such as altmeter pitchup/down..

You can make your own sources to animate all kinds of gauges on cockpits. I have made my own HUD animations myself quite easily, and I prefer that method as I find the BIS HUD's look cool - but they are not very useful because they are so small on the screen.

One can very easily create a script that provides updated source information to run your own custom gauges and HUD detail.

Share this post


Link to post
Share on other sites

I wouldnt have thought that this is possible, but if you already use this technique, I'm glad that I learned something new.

Share this post


Link to post
Share on other sites
Quote[/b] ]

. I have made my own HUD animations myself quite easily

Care to share?

icemotoboy im still a bit confused here. example your class wing still uses type rotation.

which is a source in hud config.. type & source seams to get me confused..

and are you telling us that animate command also works on the hud?

Share this post


Link to post
Share on other sites

No problems, I'm a real fan of cockpits and such - so I tend to devote far to much of my time to them.  Actually, my favorite part of addon editing at the moment is cockpits!

Quote[/b] ]and are you telling us that animate command also works on the hud?

No, but you can achieve a HUD without using the inbuild method of making a HUD. I don't use the inbuilt HUD animation method, I use my own through model creation, transparent textures, and such.  For numbers and the like, I have used the HUD system but for reticules and the like, I use flat planes with alpha.

Animation Source

Source refers to the "value" generated by the game to move the item you are animating.  There are defined sources (that you listed above) that can be used, or you can create your own animation sources by using the AnimationSources section in your aircraft's config file.

However, the catch is that engine provided sources (such as flap, speed, etc...) are calculated and updated automatically by the engine - whereas your own animation sources are not.  For this I create a watch script, that checks the values and reports them back appropriately.

Pretending there wasn't a source for "speed", you could make a speed source by having a watching script that does the following:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">while {alive player} do {

  _vehicle = vehicle player;

  _speed = speed _vehicle;

  _vehicle animate["speed",_speed];

 sleep 0.01;

};

Approximately each frame, the script would update the animation "speed" to equal the current speed of the vehicle.

Animation Type

This is HOW you are animating the object.  Are you rotating it?  Translating (moving) it? Hiding it? Basically, what are you doing to the object you want to animate.  These are hardcoded and you can't directly create your own types.

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  

×