Home   Help Search Login Register  

Author Topic: Any simple Chaff/Flare scripts exist?  (Read 3259 times)

0 Members and 1 Guest are viewing this topic.

Offline Nirrum

  • Members
  • *
Any simple Chaff/Flare scripts exist?
« on: 30 Mar 2011, 00:39:04 »
Is there anyone who can help me with a simple script.   I am making an intro in my ARMA2 map, however I need a doomed helicopter to fire off some chaff and flare before I setDamage 0.8.

I've searched the forum and script downloads but cant find a script which suits.  I am assuming its a simple script by the way  ???

Basically I need the huey to fire off about 5 or 6 chaff/flares before it explodes.   I can attempt to script it myself but I just need pointing in the right direction  :blink:

Thanks

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Any simple Chaff/Flare scripts exist?
« Reply #1 on: 30 Mar 2011, 11:51:45 »
Hi,

Moved your topic here since it's nothing to do with actual config scripting, I believe :)

Anyway, the easiest way I thought of doing this would be to simply add a "FlareLauncher" to the helicopter, and have it physically shoot that. So, something like this.

Code: [Select]
heli1 addmagazine "FlareLauncherMag";
heli1 addweapon "FlareLauncher";

for "_i" from 0 to 7 do
{
heli1 fire "FlareLauncher";
sleep 1;
};

heli1 setdamage 0.8;

The name of the helicopter being heli1. That -should- work. What I found was that, for some inexplicable reason, whenever you make the helicopter shoot flares using a script, it also gives an automatic hint which seems to be the position of the helicopter at the moment of shooting. Some old debug code or something from BIS, I'd wager, but it's very annoying. I don't think it should show when inside a cutscene though, so maybe that's okay? I'm really not sure how to get rid of it (maybe a spam of empty hint ""'s would be enough?)

Anyway, good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Any simple Chaff/Flare scripts exist?
« Reply #2 on: 30 Mar 2011, 15:04:40 »
Quote
What I found was that, for some inexplicable reason, whenever you make the helicopter shoot flares using a script, it also gives an automatic hint which seems to be the position of the helicopter at the moment of shooting. Some old debug code or something from BIS, I'd wager
Actually, it might be some debugging code from Maddmatt who made almost all (if not all) of the particle scripts, at least in a script called flares.sqf (found in Ca/data/particleEffects/scripts/muzzle) there is a line hint format ["%1",_flarevel]; that is not commented out :P
« Last Edit: 30 Mar 2011, 15:06:22 by h- »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline VIPER[CWW]

  • Members
  • *
Re: Any simple Chaff/Flare scripts exist?
« Reply #3 on: 12 Apr 2011, 01:48:56 »
I made an example mission a while back which has now been added to the Script Snippets over @Armaholic by DarkXess, feel free to check out the example mission

Offline Nirrum

  • Members
  • *
Re: Any simple Chaff/Flare scripts exist?
« Reply #4 on: 14 Apr 2011, 17:44:19 »
Thanks Wolfrug  :good:

Works great, I had to paste 3 triggers in order to get the desired effect as the script only made it fire flare once.

I see what you mean about the hint sound, the "ding" kind of breaks the ambience of the intro, but hey im not Martin Scorsese  ::)

Cheers!

Offline VIPER[CWW]

  • Members
  • *
Re: Any simple Chaff/Flare scripts exist?
« Reply #5 on: 19 Apr 2011, 01:23:59 »
well if you use my example you only need one trigger and you dont get the hint sound... which can be removed by using hintSilent fyi.