Home   Help Search Login Register  

Author Topic: Tank with m240 top-hatch mounted mg now posible?  (Read 2355 times)

0 Members and 1 Guest are viewing this topic.

Offline ryankaplan

  • Members
  • *
  • yeah...
Tank with m240 top-hatch mounted mg now posible?
« on: 02 Sep 2004, 13:20:23 »
well, if you haven't read the news today go read it now. You'll see a new boat addon with more than 1 gun mount. in fact it has 3 i think. now don't get me wrong, i can't make any addons cos i simply didn't like oxygen and don't have 3dmax.

so, one really wanted addon by most ofp players has always been a "realistic tank" with a top mounted machine gun controlled by the CO or the loader of the tank when he turns out. or to make it even simpler, they could make a new crew for the tank called the "loader" and just give him an mg on top of the tank.

is it possible?

Uldics

  • Guest
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #1 on: 02 Sep 2004, 18:00:59 »
I tried the boat, it has 4 guns. But the guns are as separate objects. It is working fine on a boat, which is staying horizontal. When the boat gets on shore, it is no more horizontal and the gun is kind of "setpos'ed" in the place relative to the boat position, but not the pitch and roll angle. That it is in the right place, could only be scripted, if it would be possible to get to know the vehicles pitch and roll. BUT it will allways be horizontal, as it is not possible to choose its pitch and roll.

The answer is: the tank you are asking of could be made only if it is always driving with pitch and roll angles of 0 degrees, or if gun number two is gyrostabilized on that tank. That is the same problem of making one object drag another (plane, or cars dragging another).

Offline Colonel_Klink

  • Members
  • *
  • Independent Addon Creator
    • DC3D Game Modelling Zone
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #2 on: 04 Sep 2004, 05:48:58 »
Uldics is correct. While I was able to  adjust the height of the guns in relation to the boat, there is no way that I know of to set relative pitch and roll of a vehicle. If you notice on the boats the guns remain in a vertical stance while they rise and fall according to the boat pitch.
This is done by calculating the pitch of the main boat then trasferring the angle as a vertical distance to the guns, which are moved up and down accordingly.
I wish.. really wish there was a way of getting a vehicles pitch and roll and then setting it on another.. would solve a lot of multi gun positioning on aircraft, land vehicles etc. Not to mention a whole host of other clerver things.
Rebel without a pause...D.I.L.L.I.G.A.F.

Homefry31464

  • Guest
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #3 on: 04 Sep 2004, 23:01:16 »
I thought you could get pitch... just not set it.

Offline calvinb1nav

  • Members
  • *
  • I'm a llama!
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #4 on: 09 Nov 2004, 03:40:42 »
Red Hammer Studios had a video showing a .50cal mounted on the commander's hatch of a T-55 (I think) and it looked to work quite well.  Not sure when they are gonna release it. See http://ofp.gamezone.cz/index.php?showthis=7156

PBAR
B-1B WSO

Dubieman

  • Guest
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #5 on: 09 Nov 2004, 20:19:52 »
Not that it helps but the (M109??) Paladin from the COC arty from DKM had an MG on top of the turret. Instead of its machine gun being next to the barrel of the main gun it was on top but nobody was behind it. You'd use it like the reg mg gun on BIS tanks. And it looked like the bullets were coming out of there too, not down by the barrel where the BIS models have it.

Not that it adds much but it simulates it. I think it turns with the barrel/turret. Could be an alternative for now till OFP2 comes out where they WILL fix many of these problems. ;D

But anyways I was wonderin if its possible to have the normal MG beside the main gun and the MG on top and yet have the muzzle flash be in the appropiate place for the appropiate weapon. The MGs would have the same sorta controls but maybe diff guns. 1 next to barrel is a M240 or .50 and the top one is another kind, M249, M60, .50, .30, or something else. Just an idea. :P

Offline Colonel_Klink

  • Members
  • *
  • Independent Addon Creator
    • DC3D Game Modelling Zone
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #6 on: 10 Nov 2004, 01:18:03 »
Quote
But anyways I was wonderin if its possible to have the normal MG beside the main gun and the MG on top and yet have the muzzle flash be in the appropiate place for the appropiate weapon. The MGs would have the same sorta controls but maybe diff guns. 1 next to barrel is a M240 or .50 and the top one is another kind, M249, M60, .50, .30, or something else. Just an idea.

Yes it is possible. Its a matter of using the fire eventhandler and having scripts that show the appropriate muzzleflashes as the different guns are fired.





Link to tutorial
Rebel without a pause...D.I.L.L.I.G.A.F.

m21man

  • Guest
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #7 on: 10 Nov 2004, 01:44:14 »
Quote
thought you could get pitch... just not set it.
You can compare an object's position, velocity, and direction in order to find its pitch. However, there is no command to set an object's pitch.

Dubieman

  • Guest
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #8 on: 10 Nov 2004, 02:26:15 »
It is possible then to have somethng like that then. Would the bullets be made at the appropiate places too? I've had a MIG29 once where the cannon rounds spawned at the tail of the plane... :P

Well yes it probably is, now that I think of it...I'm very unintelligent in the world of addons... :P :D

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #9 on: 10 Nov 2004, 02:33:59 »
You can compare an object's position, velocity, and direction in order to find its pitch. However, there is no command to set an object's pitch.
well then couldn't you use those same elements to set the pitch?

can you post how you would compare those to get the pitch also?
« Last Edit: 10 Nov 2004, 02:35:08 by Triggerhappy »

Dubieman

  • Guest
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #10 on: 10 Nov 2004, 02:38:20 »
Quote
You can compare an object's position, velocity, and direction in order to find its pitch. However, there is no command to set an object's pitch.
 
well then couldn't you use those same elements to set the pitch?

No command=no dice...
Even if it was possible to setpitch via three variables like that. It would have to be one nice little script to keep it going, turn one off and such once a vehicle hit flat land. I could be wrong but usually with no command, you can't do that. Like there is no setwind.... :P

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #11 on: 10 Nov 2004, 02:57:00 »
cant functions be used in place of a command that is missing?
such as make a function to get the pitch and then make one to set the pitch and then keep looping both of them... I might be wrong as well...

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #12 on: 10 Nov 2004, 03:05:36 »
ahem:
getpitch/getbank function

I'm not good with functions, but i'm sure someone could reverse this to use as a setpitch/setbank function...
« Last Edit: 10 Nov 2004, 03:06:43 by Triggerhappy »

m21man

  • Guest
Re:Tank with m240 top-hatch mounted mg now posible?
« Reply #13 on: 11 Nov 2004, 23:45:03 »
Quote
I'm not good with functions, but i'm sure someone could reverse this to use as a setpitch/setbank function...
You can't "reverse" the function. That function works by using fancy maths that interpret data (I'd assume from the getvelocity and getdir commands). However, neither setvelocity nor setdir has any ability to directly alter an object's pitch. There's a major difference between interpreting a bit of OFP data and directly setting pitch.

Edit - Oops, you don't need getpos to determine an object's pitch :P .