Jump to content
Sign in to follow this  
Drakkhen

Getting vehicles data

Recommended Posts

Hi,

does anyone know if there is a way to get RPM value, control X/Y, etc...?

The reason of this is that we have an RPM hand on the instruments, I guess it relies on an RPM value somewhere in the PC memory, but while there is two commands to get the bearing of a vehicle (getdir, direction), there's no one to get the RPM value.

So are these invisible data:

- Sight (direction but in 3D vector)

- Absolute Z (visible in baro alt)

- Fuel level

- Fwb/Bckwd control pos (somthin'like -1.0 to 1.0 value)

Since I currently work on a plane, does someone know if there is a way to have (like on choppers) TWO gyros?

Thanx alot for any clue.

Share this post


Link to post
Share on other sites
Hi,

 does anyone know if there is a way to get RPM value, control X/Y, etc...?

Maybe by reading the RPM animation? Try : this animationphase "IndicatorRPM"

You also could make use of the RPM2 feature

 The reason of this is that we have an RPM hand on the instruments, I guess it relies on an RPM value somewhere in the PC memory, but while there is two commands to get the bearing of a vehicle (getdir, direction), there's no one to get the RPM value.

 So are these invisible data:

- Sight (direction but in 3D vector)

The drop command is accurate ofr this,but also can be done with some math

- Absolute Z (visible in baro alt)

Sea level? Search for absolute height I think it is

- Fuel level

Fuel command in the comref ...? Fuel Vehicle < .1 : _plane say "danger"

- Fwb/Bckwd control pos (somthin'like -1.0 to 1.0 value)

?? Planes don't fly backwards? Not sure what you mean? Reverse would show a -kph

 Since I currently work on a plane, does someone know if there is a way to have (like on choppers) TWO gyros?

Yes ytou can have multiple props by using the naming vrtule,vrtule1,vrtule2

 Thanx alot for any clue.

Heres some

Share this post


Link to post
Share on other sites
Hi,

Maybe by reading the RPM animation? Try : this animationphase "IndicatorRPM"

You also could make use of the RPM2 feature

Great idea but the animationphase constantly returns 0.

Are you sure of the animation name or that it's really an animation?

The drop command is accurate ofr this,but also can be done with some math

Drop's fine for creating a custom oriented object (set it), but how could you get the 3Dsight axis of an already existing object?

- Absolute Z (visible in baro alt)

Sea level? Search for absolute height I think it is

Yeah... absolute height... is there a function for this?

(this getpos select 2 returning the relative height)

Fuel command in the comref ...? Fuel Vehicle < .1 : _plane say "danger"

Ok... mistaken by the "fuel" eventhandler.

Planes don't fly backwards? Not sure what you mean? Reverse would show a -kph

I meant that when you pull the [down arrow] key... it's a negative acceleration (not like the joy throttle set to the min). It makes A-10's/Su25's airbrakes deploy. I would like to get this event. I guess that if your animation phase trick works, I could get it (if I manage to find the correct aileron animation name ;)).

Yes ytou can have multiple props by using the naming vrtule,vrtule1,vrtule2

Multi props, yes... two altimeters, yes... but not with gyros in planes. And I've never seen two of them working in any plane mod.

Share this post


Link to post
Share on other sites

Thought being able to get a value proportional to the RPM, catching the current fuel amount and computing the difference every 0.3s but while I can precisely set the RPM with the joy throttle, the fuel consumption only returns 2 values (X depending on sampling frequency-burning fuel OR 0-idle).

I wonder if it's simply possible.

Share this post


Link to post
Share on other sites

No one has any clue about all this?

- rpm

- absolute Z

- controls

- gyros

- how to put other weapons on vehicles (grenade launcher, etc... on planes, helos, boats)...

crazy_o.gif

Where could I find an answer... at least?

Share this post


Link to post
Share on other sites

- RPM value: wherefore do you need it? maybe I know any way to do it otherwise

- absolute Z: an easy thing

  put that in your script or make a function (*.sqf):

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_logic="Logic" camCreate [0,0,0]

_logic setPos [getpos _myplane select 0,getpos _myplane select 1,0] // setpos works with absolute height

_absZ = (getpos _myplane select 2)-(getpos _logic select 2) // "-" because the logics Z is a negative value

camDestroy _logic

- controls: tried that one too, for airbrake I only know another way:

  write a simple script

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

?!(alive _plane1) : goto "exit"

_spd1 = speed _plane1

~0.5

_spd2 = speed _plane1

if(_spd2<(_spd1-10)) then {_myplane animate ["brake",1]} else {_myplane animate ["brake",0]}

goto "mainloop"

  not perfect, but works

- gyros: what is that? my english is too bad to know

- put other weapons ... : what exactly do you want to do?

Share this post


Link to post
Share on other sites
Quote[/b] ]RPM value: wherefore do you need it? maybe I know any way to do it otherwise

Needed it for AB, overheating and outakes configuration routines, also to make my airbrakes script work more precisely. You think you have the solution?

Quote[/b] ]_logic="Logic" camCreate [0,0,0]

Yep... got quite that trick already, "quite" because mine use more CPU (I didn't simply substract), but I wondered if there was another lighter way (a function name or a global variable) since they have one to make the altitude indicator work.

Quote[/b] ](_spd2<(_spd1-10))
Got that one too... and you're right again, "not perfect but works". I tried to take account of (velocity _this select 2) to avoid animating the brakes while I climb or retrieve them while I dive but even with that... it's pretty messy, mostly when the plane tight-turns.

"gyro" is the artificial horizon. In choppers we can have two but in planes, it seems we are limited to ONE. I tried to derivate the class, simply add a "2" behind "horizont" and its "osa" but nothing seems to work.

Thanks anyway for the "absolute altitude" tip... faster and lighter than the previous I did. wink_o.gif

Share this post


Link to post
Share on other sites

Afterburner is an easy thing to make:

You do the whole thing like in the tutorial of colonel klink (http://www.dc3d.org)

but you make cones like mine in the picture below

you name the whole stuff both 'vrtule' ('vrtule 0' and 'vrtule 1' if you've two engines) and 'vrtule blur'

don't forget to make the axis 'osa vrtule' in the Memory LOD

then you name the points in the back 'RPM', make an axis somewhere 14 meters up the points, call it 'osa_rpm'

tutburner.gif

now the config.cpp stuff: in cfgModels where it says sections[]={} you rename it 'sections[]={"vrtule blur"}' to get it working

then you make a new class in your cfgModels class,

called 'IndicatorRPM', I think you know the rest, define the two points 'RPM' and 'osa_rpm'

if you already have the indicator in the driverView LOD you have to place 'osa_rpm' (in 0.00 LOD) so that both need the same value at 'angle='

if you've any problems mail me (Email adress on the site in the signature)

and with those dammed gyros, I've that problem too

but I know it works with planes, have seen it in DKM_BRONCO addon, but dunno how they got it to work

Share this post


Link to post
Share on other sites

Ah??? Got the Bronco too but on the version I have, only the HUD lines gyro seems to work. I haven't seen the dash one turning.

Ok for the burner. But it will remain difficult to make scripts using RPM (overheat etc) except if I copy the FDF_Mig21 system where you have an action to switch AB on/off.

I'll feedback this thread if I ever find something with the gyro.

Fly-Bye!

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  

×