PDA

View Full Version : Removing hint on the flarelauncher.



Howard
Aug 5 2009, 23:32
So I've been trying to get this C-130 to have flares...
I found the flarelauncher weapon and added it to the aircraft, works pretty nicely... The problem is that everytime you fire it you get this ding sound from a hint and some coordinates come up in the upper right corner of the HUD.
I made this quick video just to show you what I'm talking about:
3dJwO6i_loo&fmt=22

Is there any way to remove that?

Smoot178
Aug 6 2009, 00:44
Where did you get that AC-130? :D

F2k Sel
Aug 6 2009, 00:50
Is it script or an addon, if it's script look for a hint command.

If it's an addon you will need to unpack it and search through it for a possible script and remove the hint and then you can pack it up again. I don't have any link you'll have to search for them.

Howard
Aug 6 2009, 01:01
Is it script or an addon, if it's script look for a hint command.

If it's an addon you will need to unpack it and search through it for a possible script and remove the hint and then you can pack it up again. I don't have any link you'll have to search for them.

It's in vanilla ArmA 2.

http://community.bistudio.com/wiki/ArmA_2:_Weapons
Search for "Flarelauncher"

Big Dawg KS
Aug 6 2009, 12:45
Then dePBO the official addons and find the script and/or eventhandler that calls it.

nuxil
Aug 6 2009, 13:08
look like they forgot to remove a hint they used in testing.

Ca\Data\ParticleEffects\SCRIPTS\muzzle\flares.sqf

on line 43

blame Maddmatt for beeing to lazy double test his effects :p jk.
this happens. guess they fix that in next patch 2-3 months. so eighther copy & use that script without line 43. or wait

nikita320106
Aug 6 2009, 13:29
So I've been trying to get this C-130 to have flares...
I found the flarelauncher weapon and added it to the aircraft, works pretty nicely...

can you share with us yours config with flareslauncher???

Howard
Aug 6 2009, 13:32
look like they forgot to remove a hint they used in testing.

Ca\Data\ParticleEffects\SCRIPTS\muzzle\flares.sqf

on line 43

blame Maddmatt for beeing to lazy double test his effects :p jk.
this happens. guess they fix that in next patch 2-3 months. so eighther copy & use that script without line 43. or wait

Yeah, I'm looking at it here, thanks!
Now, you'll have to guide me out of this aswell. I'm guessing that if I just save this, PBO it and overwrite the old CA.pbo I will get FADE triggered or something like that... So, is it possible to just create a new mod folder and put it in there? Or is it somehow possible to just extract this script and use it in a mod folder or something like that, cause I'd like to use this on multiplayer and either have a small addon that someone have to DL or put it in a mission folder or something like that..

nuxil
Aug 6 2009, 13:50
umm.. well i can give you an example

make a test mission or something..

put a heli plane or what ever in ther as player.. then on init line you put


vehicle player addEventHandler ["IncomingMissile",{_this execVM 'flares.sqf'}];


put some aa soldiers out and test.. altho this dosent spoof the missile.. you need a spoof script. which would be simple to make,

Howard
Aug 6 2009, 14:01
Well, that's OK I guess.
But I'd rather like to have it as it is now, where you have a weapon called Flares so that you can fire them off manually whenever you want.
But a spoof script would definitly be good to have, though I don't like how the missile will track the flares 100% of the time...
Takk!

nuxil
Aug 6 2009, 18:17
But I'd rather like to have it as it is now, where you have a weapon called Flares so that you can fire them off manually whenever you want.

alright.
its nice that its a weapon class you can add to a vehicle. but the problem with it is that wount have time to react by the time a missile is incomming. if you dont use a event handler to give you atleast some sort of warning. changing weapong while trying to avoide beeing hit by the missile will become messy.

autoflares is the way to go imo .. but then again the nice thing with arma is. if you dont like the way it is.. mod or script it like you want :p

here is a example video i made using autoflares. where there is a x % chance of missile hitting

http://www.youtube.com/watch?v=gGG13FzS3II

Big Dawg KS
Aug 6 2009, 18:48
alright.
its nice that its a weapon class you can add to a vehicle. but the problem with it is that wount have time to react by the time a missile is incomming. if you dont use a event handler to give you atleast some sort of warning. changing weapong while trying to avoide beeing hit by the missile will become messy.

autoflares is the way to go imo ..

Could just create a script that automatically selects & fires the flares when you press a certain key/action.

nuxil
Aug 6 2009, 19:04
sure.. or even script in an option to set in as manual or auto :)

Big Dawg KS
Aug 6 2009, 19:07
You can implement it however you want, but personally I like the idea of having them defined as a weapon. It makes more sense that way, plus you can still have a "fire flares" key/action that selects & fires them for you in addition that to being able to select & fire them manually.

Automatically firing them however is less realistic, and also takes any challenge out of it.

MikeJHunter
Aug 7 2009, 01:04
Nux are you going to release your script?

Benneb
Aug 11 2009, 23:07
Does a missile automaticly chase a flare or do you have to change its current target?

If you have to do it manually, can someone give me a pointer on how do you do it?

nuxil
Aug 12 2009, 12:09
MikeJHunter: No i am not doing that as i see no point in it now.



Does a missile automaticly chase a flare or do you have to change its current target?

if you create your own flarescript setup you need to spoof the missile.


**** SOME NEWS ****

after messing with my own flarescript setup i got kinda anoyed. it only worked local :(
so i did investigate the flare thingy in Arma 2.


Now its SUPEREASY to set up the FlareLauncher without getting that anoying hint message each time you release a flare..

hers how you get it working..

depbo Ca.pbo

copy the file Ca\Data\ParticleEffects\SCRIPTS\muzzle\flares.sqf to your mission dir..

open the file and remove line 43 ofcource.. "the hint line"..

next.. in your init.sqf you put something like this,,


waitUntil {player == player};
BIS_Effects_Flares=compile preprocessFileLineNumbers "flares.sqf";


Add "flarelauncher" and "FlareLauncherMag" to a c130 or anyother vehicle..


i tested it by running 2 x arma on desktop and 1 ded server in vmware.. and it works :)


happy flares people :p

Schilly
Aug 12 2009, 12:24
After playing with it... It seems the FlareLauncher does not spoof the missles, however, makes it difficult if not impossible to get a lock on the plain while its firing off the flares...

So that may be the intended use, for example with the c130 blowin flares while dropping cargo like a maniac...


Not 100% on this though.

luckyhendrix
Aug 12 2009, 15:54
no actualy Flare have no effect at all on missile or locking

nuxil
Aug 12 2009, 16:34
hmm.. the missiles seams to blow up in the flare area.. but i might imagen it

nuxil
Aug 12 2009, 21:19
hmm.. the missiles seams to blow up in the flare area.. but i might imagen it

I was indeed doing that..
after carefull examination i conluded the flares ingame is only eyecandy.
and the hit area is usaly around tailrotor area.


well thats the case with the orginale flares.

doing minor changes to the script lets you spoof the missile. :)

in flares.sqf look for.


(_emmiters + _flares) spawn
you find this at the bottom of the file :)

now add some code just above the that...



_missiletypes = ["M_Stinger_AA", "M_Sidewinder_AA", "M_Sidewinder_AA_F35", "M_Strela_AA", "M_Igla_AA", "M_R73_AA", "M_9M311_AA","igla"];
_list = (getpos vehicle player) nearObjects 120;

_nr = count _list;
for [{_i=0},{_i <= _nr},{_i=_i+1}] do
{
_obj = _list select _i;
_type = typeOf _obj;
if (_type in _missiletypes) then {_obj setdir (getdir _obj) + (random(200)-100);};
};


(_emmitters + _flares) spawn
{
.....


this seam to work for me :)


but you should spam with flares.. to get best result


ps: could a mod move this thread to MISSION EDITING & SCRIPTING as it realy belongs there :p


http://www.youtube.com/user/nuxxil

Cyborg11
Aug 14 2009, 00:47
@<hidden>: Thanks for it! Works great !!! :)

But one question:
I removed the hint line in the flares.sqf Script but the hint still displays every time I shot a flare. :/

EDIT: Added a sleep command to the init.sqf and it works now :)

waitUntil {player == player};
sleep 0.5;
BIS_Effects_Flares=compile preprocessFileLineNumbers "flares.sqf";

Cyborg11
Aug 15 2009, 23:31
Don't know why but the fire command on the Flarelauncher doesn't work.


_plane selectweapon "flarelauncher"; // works
_plane fire "flarelauncher"; // the plane will not fire the flares

Because this doesn't work I can't make automatic flares and the AI can't use the flares too :(

nikita320106
Aug 17 2009, 06:29
_plane fire "flarelauncher"; // the plane will not fire the flares


_plane fire "flarelauncher";
it's work for me
try to add weapon for every air unit in (i'm add in main section(not in turret))
=======
anoter q) for those who understanding in basic trigonometry)


_relpos=_v modeltoworld (_v selectionposition format["flare_launcher%1",_i]);
_dirpos=_v modeltoworld (_v selectionposition format["flare_launcher%1_dir",_i]);


_flare="FlareCountermeasure" createvehiclelocal _relpos;

_dirpos=[(_dirpos select 0) - (_relpos select 0),(_dirpos select 1) - (_relpos select 1),(_dirpos select 2) - (_relpos select 2)];

//Calculate vehocity to launch flare at
_div=abs(_dirpos select 0)+abs(_dirpos select 1)+abs(_dirpos select 2);
_flarevel=[(_dirpos select 0)/_div*_muzzzlevel,(_dirpos select 1)/_div*_muzzzlevel,(_dirpos select 2)/_div*_muzzzlevel];

we're check for direction of flare_launcher and calculate him velocity))
but/problem here/ Im want to change direction to to plane's direction!!))
can someone add here some simple solution for those who badly studied in school))
another one q))
how change particle params that he's continued to fall not losing velocity so mach))
sorry ma bad engliz)

Eagleone
Aug 17 2009, 19:04
how to add flares to all aircraft, mean, even for those who are controlled by AI

this, but not only for player:

vehicle player addEventHandler ["IncomingMissile",{_this execVM 'flares.sqf'}];

thx

nikita320106
Aug 18 2009, 08:10
something like this

_list = getpos player nearObjects ["AIR",1000];
{_x addEventHandler ["IncomingMissile",{_this execVM 'flares.sqf'}]} foreach units _list;

but may be) i' don't now correctly you can try
addmagazin "FlareLauncherMag"
addweapon "FlareLauncher"
and some {_x fire "flarelauncher"} foreach units _list

you should check wiki (http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2)

Eagleone
Aug 18 2009, 13:17
nikita320106

thx, but:

_list = getpos player nearObjects ["AIR",1000];
{_x addEventHandler ["IncomingMissile",{_this execVM 'flares.sqf'}]} foreach units _list; is not working.


addmagazin "FlareLauncherMag"
addweapon "FlareLauncher"
and some {_x fire "flarelauncher"} foreach units _list
i dont want use manual flares, i need only auto use.


you should check wiki
I am not sсripter, I do not understand this, that is why I asked the question

Schilly
Aug 19 2009, 01:17
The spoofing posted above... Doesnt seem to work very frequantly... Is there a probability built into it that can be increased?

nikita320106
Aug 19 2009, 07:56
as you seen
i'm not scripter too
then no basic copy-past solution
you guys
should be
try to perform
more effort
and check the syntax
and understand what is written
two very simple solutions even for me
so?? why not Is there a probability built into it that can be increased? by youself??

Schilly
Aug 19 2009, 14:06
The question was simply if there is probability in it already... As I am curious if there is or not... As I do not quite understand the written code, there doesn't seem to be probability in it, however it also doesn't seem to be spoofing every missile.

[45Cdo]Kotp
Aug 22 2009, 11:38
This dont seem to work in Multiplayer ?

I can create a server and it loads up fine for me , but when others try to join they get Session Lost and get booted from server ?

Anyone else had success with this online in multiplayer with others ?

EDIT !.......

It's ok got it working fine now and works a treat thanks :)

28thCDM
Dec 4 2009, 22:14
hi i have the launcher attached by for the life of me i can not find the class name for the FlareCountermeasure so i can add the magazine i have tried

thisaddmagazine "FlareCountermeasure"
thisaddmagazine "Flare"

but they are unknow can anyone post it please many thanks

Planck
Dec 5 2009, 00:22
"FlareLauncherMag"


Planck

Keshman
Apr 23 2010, 21:41
Hello guys. First thanks for your script and the idea. I and my friend (VVL99) a little finalized and updated this idea (script) :) Our work and video and demo mission you can see and download! Here:
Video and demo mission (work flares) (http://armedassault.kiev.ua/forums/forum49/thread2069.html?langid=1) Waiting for your new ideas! on this script! Thx.