Home   Help Search Login Register  

Author Topic: What did that vehicle just fire? For all addon vehicles.  (Read 547 times)

0 Members and 1 Guest are viewing this topic.

Offline Zayfod

  • ECP Team
  • *
  • Llama, softest natural fibre in the world.
Did he fire a shell? Or a bullet?

This can be done several ways (that I know of)--all the hard way and heaps of typing and constant updates required for the new addons as they arrive. By either creating an array of all the specific ammo that all the addon vehicles use or by creating an array of all the addon vehicle gun types. Then simply check those arrays using a fired EH.

Well what Id like to know is this. Is it possible to find out if he fired a shell or a bullet without checking either ammotypes or gun types?

Can we make a script thatll do this for all addons.

I almost had it by checking the projectiles speed--almost worked except bmp, t55, and a couple others shells traveled slower than a lot of bullets so that screwed it all up--bugger it. So close yet so far.

Any ideas?

Plz give me a yell.

Zay

"I have come here to kick ass and chew bubble gum......an I'm all outta bubble gum!"

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:What did that vehicle just fire? For all addon vehicles.
« Reply #1 on: 30 Oct 2003, 06:55:16 »
What exactly is this for?

I think you may have to do this via an array, as you suggested. The array doesn't have to include EVERY tank ever made though; the editor will just have to make the array according to which tanks are in his mission.

Just a thought, though. Doesn't the "fired" eventhandler return which "muzzle mode" the bullet was fired from? That is, either "single", "burst" or "auto"? Couldn't you use this, since most shells are fired from "single", while most guns are "auto" machine guns?
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Zayfod

  • ECP Team
  • *
  • Llama, softest natural fibre in the world.
Re:What did that vehicle just fire? For all addon vehicles.
« Reply #2 on: 30 Oct 2003, 07:22:03 »
Quote
That is, either "single", "burst" or "auto"? Couldn't you use this,


Depends on the vehicle, most of the standard Bis vehicles return mode "this"--that being if a Heat73 is fired the mode == "Heat73" but I discovered numerous addons that dont do this.

Maybe they simply left it outta their config.cpp

Besides, some vehicles main guns are not shells at all
"I have come here to kick ass and chew bubble gum......an I'm all outta bubble gum!"