Home   Help Search Login Register  

Author Topic: BETTER FLAK SCRIPT  (Read 1484 times)

0 Members and 1 Guest are viewing this topic.

Bluelikeu

  • Guest
BETTER FLAK SCRIPT
« on: 17 Jun 2005, 00:21:23 »
Hey all,

This script is different from other scripts because instead of creating the effect of flak
even when no one is shooting at the plane, the flak is generated based on how near a projectile is
to the plane. The script is activated by the fired event handler. Once a bullet is fired by the
specified unit, the script will check to see if it is next to a plane or not, and then if it is, delete the projectile in time
and the create one flak effect around the plane in question. The flak effect does do damage and can
easily be modified to not do any, if you know a bit about scripting.

to activate the script, place this in the init field of one of your units. Preferebly pick a unit
that can fire at air targets, such as the vulcan, or the shilka:



this addEventHandler[{fired}, {[_this select 0, _this select 4] exec {flakscript.sqs}}]



From here on, the script will handle everything.

Try it out, I'im sure you'll be suprised as to its capabilities!

The script should have very little lag, i did not experience much lag at all with the given example mission. Just to let you know, my computer specs are much worse than Corbon Dallas's.


PLEASE DON'T TELL ME THAT A SCRIPT LIKE THIS HAS ALREADY BEEN DONE without an addon
« Last Edit: 17 Jun 2005, 00:29:19 by Bluelikeu »

Offline oyman

  • Members
  • *
  • king of pings
Re:BETTER FLAK SCRIPT
« Reply #1 on: 17 Jun 2005, 01:23:11 »
this is a cool flak script, but is there anyway to make the shilka fire at more than 1 vehicle class :-\

Bluelikeu

  • Guest
Re:BETTER FLAK SCRIPT
« Reply #2 on: 17 Jun 2005, 14:25:43 »
oh ya, sorry i forgot to mention that completely. Just add new plane names to the FLAKABLE list. ie

FLAKABLE = ["Su25", "a10lgb", "a10", "parachute"]

you can even have the AA gun get flak around a parachute. However, I'm not sure of the names of the paras that the west side or that the east side uses.

EDIT: The FLAKABLE list is already created in the example mission, HINT: its a trigger, yep.

btw, if any of you recieve lag, I have another script that does not loop through the FLAKABLE list, only down side is that you can only select one plane at a time. But this might suit your purpose better since, many people will not have more than one plane type on their map.
« Last Edit: 17 Jun 2005, 14:28:01 by Bluelikeu »