Home   Help Search Login Register  

Author Topic: Ammo for BAS Goverment ZU-23-2  (Read 1311 times)

0 Members and 1 Guest are viewing this topic.

Offline Carl Gustaffa

  • Members
  • *
  • I'm a llama!
Ammo for BAS Goverment ZU-23-2
« on: 19 Dec 2005, 21:55:20 »
Hi

Just a few more questions from a scripting/editing newbie.

I am trying to make a script that simulates a airdefence flak cannon thingie. I am almost there with using a shilka or vulcan, because I found listed their ammotypes. But I really want to make it work with the BAS Goverment ZU-23-2 or any other ZU's. I have looked in ammolists and sneaked into various pbo files, but I'm not getting close.

1) Does anyone know the name of the ammo for this addon vehicle?

2) And so, how on earth did you find it?

Currently I'm using a shilka, where I am controlling the rate of fire using doFire target ~0.2 and doFire Dummy (not "aimable" due position). I couldn't get the "NEVER FIRE" (Blue?) command to work this way. I also did a wild guess at doFire NULL but that didn't seem to do anything good either.

3) Is there a better way of controlling a doFire and "don'tFire" sequence to reduce the firing rate?

I would prefer to use the ZU-23-2 because of it's limited firing rate, maybe getting rid of that firecontrol alltogether. However, the ZU-23-2's shells, whatever they are, can take down any aircraft with just a few rounds fired.

4) Is there any way of shooting blanks and do scripted damage control?

Setting gunners skill very low lowered his firing rate (excellent!), but his aim is still far too good. In an attempt of making the AI a lousy shot, I used setSkill for the gunners initfield to very low, but now he never even takes a single shot? I guess commander should be high so that aircraft can be spotted early enough and be assigned a target by him.

5) Is this a bug in the engine?

As already said, I'm using a shilka in this role currently (because I know the ammoname). The script is setup to create a flak (friendly AI, called by radio) randomly around the aircraft with an approximate delay for which the tracer (regular shilkacannon ammo) takes to reach the aircraft coordinates. A bit messy coded and not userfriendly, but it kindof works. However, this distancebased delay from fired to explosion tend to get large when the distance increase, causing an unnaturally long delay between each successive shit.

6) Is it possible to use two loops independantly within a script to prevent refire having to wait for the explosions?

Any help appreaciated.

pazuzu

  • Guest
Re:Ammo for BAS Goverment ZU-23-2
« Reply #1 on: 19 Dec 2005, 22:58:19 »
You can find the weapons and ammo names for any addon. Just dpbo the file and look in the config file. You should find class names inside.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Ammo for BAS Goverment ZU-23-2
« Reply #2 on: 20 Dec 2005, 00:28:46 »
BAS usually, but not always, give them in the readme.   You can also use hint format commands to discovering while Previewing a test missionette.

dofire null is never going to work ... although dotarget "null" might.

I don't know how you could shoot blanks without creating a new type of ammo, but the answer is probably to use an invisible target addon and get a high skill gunner to shoot at that.    Hopefully he will hit it and not the nearby aircraft.

You can't use two loops independently within a script, but you could probably combine the loops in some way.   Alternatively you could launch a second script which loops and returns the result to the first script via a global variable.

Don't understand what you mean about the bug.   Can you explain again what the problem is.    The game engine has no bugs ... although it does have a number of undocumented features.   ::)
Plenty of reviewed ArmA missions for you to play

LoTekK

  • Guest
Re:Ammo for BAS Goverment ZU-23-2
« Reply #3 on: 20 Dec 2005, 14:59:23 »
2. If you want the magazine name, you can use magazines, but if you want the name of the actual projectile, you can use the "fired" EH.
Code: [Select]
_bullet = _this select 4
hint format ["%1",_bullet]

4. Thought about this for a second, and there is actually a way to fire blanks. Just like real blanks, though, you'll see no tracers. Add a "fired" EH to the unit in question that execs the following:
Code: [Select]
_unit = _this select 0
_ammo = _this select 4
_bullet = nearestObject [_unit, _ammo]
deleteVehicle _projectile
exit

Offline Carl Gustaffa

  • Members
  • *
  • I'm a llama!
Re:Ammo for BAS Goverment ZU-23-2
« Reply #4 on: 21 Dec 2005, 19:28:04 »
Thanks. "Magazines" did the trick. Can't believe I missed that one. But why do some of you always put new ideas into newbie heads? :D Now I have to try for the accurate gunner and wildly attached target instead. Even with regular ammo as well as a bomb, it would look nice with some decreasing randomness as the gunner gets his aim.

Thanks a lot! A new week in desparation :D

Oh, ideas ideas... Just messing around in there, nothing too serious.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Ammo for BAS Goverment ZU-23-2
« Reply #5 on: 22 Dec 2005, 00:18:23 »
You can easily do decreasing randomness.    All you need is the random command and a bit of imagination.

But only if you want to.  ;D

Tip:   make it work first.   Make it work in a simple special case and only once it works try to generalise and fancy up.    Don't try to do everything at once.
Plenty of reviewed ArmA missions for you to play