Jump to content
Sign in to follow this  
scottb613

BIS_fnc_fireSupportVirtual - No Shells.

Recommended Posts

Hi Folks,

 

What am I doing wrong here? I just want a steady stream of flares over my nighttime raid.

 

BIS_fnc_fireSupportVirtual is supposed to take a Marker Name as its first Arg. I tried everything I can think of. I tried setting a Var - I used with and without Array Brackets - no flares.

 

_mkr1 = getMarkerPos "POSIT";[[_mkr1], "F_40mm_White", 20, 10, 10] spawn BIS_fnc_fireSupportVirtual;

 

Yep - Rusty...

 

Regards,

Scott

Share this post


Link to post
Share on other sites

You write the position as an array with a position inside, but you need either just a position, or an object, or the name of the marker. See target here:
https://community.bistudio.com/wiki/BIS_fnc_fireSupportVirtual

Try to do it this way:

["POSIT", "F_40mm_White", 20, 10, 10] spawn BIS_fnc_fireSupportVirtual;

Or:

_mkr1 = getMarkerPos "POSIT";
[_mkr1, "F_40mm_White", 20, 10, 10] spawn BIS_fnc_fireSupportVirtual;

 

  • Like 1

Share this post


Link to post
Share on other sites
18 minutes ago, Ibragim A said:

You write the position as an array with a position inside, but you need either just a position, or an object, or the name of the marker. See target here:
https://community.bistudio.com/wiki/BIS_fnc_fireSupportVirtual

Try to do it this way:


["POSIT", "F_40mm_White", 20, 10, 10] spawn BIS_fnc_fireSupportVirtual;

Or:


_mkr1 = getMarkerPos "POSIT";
[_mkr1, "F_40mm_White", 20, 10, 10] spawn BIS_fnc_fireSupportVirtual;

 

 

Hi Folks,

 

Thanks for the response - yeah - I had tried both those methods - no joy. Reading more on BIS_fnc_fireSupportVirtual - it stated the default speed of the shell was 150 - perhaps it's just slamming into the ground with the speed of a normal shell and I don't see it?

 

On a side note - I did find a great script written years ago by "PivMan" on Reddit - while searching. It works like a champ and is far more elegant than I was planning on doing. While I am still curious why the function wasn't working for me - I plan to just use his script as it works very well.

 

Quote

Here you go pal.

http://pastebin.com/NMpkRvNX

Save this as an SQF and place it in the folder of the mission you want to run it on. Execution line can go anywhere including a trigger's activation field.

startFlares = 1; null = [A, B, C, D, E, F, G, H] execVM "skyFlares.sqf";
The script has an example but I lettered each argument here.

startFlares has to equal one for the script to continue. If you want to stop the flares, make it anything other than one.

A is the maximum distance each flare can spawn from the given position. The distance ranges from 0 meters to the number you supply.

B is the base number of seconds before a new flare can be spawned.

C is the maximum amount of more seconds randomly added to this delay.

D is the base height of each flare.

E is a maximum amount of meters that can be randomly added to or subtracted from the base height.

F is the color of the flare. Available colors are "WHITE", "RED", "GREEN", "YELLOW", or "IR". If you make this "RANDOM" each flare will be a random color.

G is the speed of the flare. Same velocity command you used. Must be negative or flares will tend to freeze in the air.

H the object the flares will be centered around. The player for example.

An example based on your original script would be:

startFlares = 1; null = [150, 30, 5, 150, 10, "WHITE", -8, player] execVM "skyFlares.sqf";
Sorry if I'm late and you've found something else but I'll need something like this eventually anyway. Good luck. 😄

E: If you don't want to use any of the random parts of the arguments setting them to 0 will effectively disable them. I also checked and flares see

 

// skyFlares.sqf
// startFlares = 1; null = [<max distance>, <base delay>, <max added delay>, <base height>, <random added or subtracted height>, <color>, <speed (must be negative)>, <object pos>] execVM "skyFlares.sqf";
 
// declare a few variables we need and make _sign randomly negative
_sign = 1;
_random = false;
if (floor random 10 > 4) then { _sign = -1 };
_flareArray = ["WHITE", "RED", "GREEN", "YELLOW", "IR"];
 
// organize our arguments
_flareDist = _this select 0;
_delay = _this select 1;
_delayRandom = _this select 2;
_flareHeight = _this select 3;
_flareHeightRandom = _this select 4;
_flareType = _this select 5;
_flareSpeed = _this select 6;
_flarePos = _this select 7;
 
// create loop for spawning flares
while { startFlares == 1 } do
{
	// check if random
	if (_flareType == "RANDOM") then { _flareType = _flareArray call BIS_fnc_selectRandom; _random = true };
	// assign colors
	switch (_flareType) do
	{
		case "WHITE": 	{ _flareType = "F_40mm_White" };
		case "RED": 	{ _flareType = "F_40mm_Red" };
		case "GREEN": 	{ _flareType = "F_40mm_Green" };
		case "YELLOW": 	{ _flareType = "F_40mm_Yellow" };
		case "IR": 	{ _flareType = "F_40mm_CIR" };
	};
	// get a random spot around the target
	_pos = [_flarePos, random _flareDist, random 360] call BIS_fnc_relPos;
	_pos = [_pos select 0, _pos select 1, _flareHeight + (random _flareHeightRandom * _sign)];
	// make the flare at that spot
	_flare = _flareType createVehicle _pos;
	// set its speed
	_flare setVelocity [0, 0, _flareSpeed];
	// delay plus random delay
	sleep _delay + random _delayRandom;
	// reset random if it was there before
	if (_random) then { _flareType = "RANDOM" };
};

 

Regards,

Scott

Share this post


Link to post
Share on other sites
1 hour ago, scottb613 said:

Reading more on BIS_fnc_fireSupportVirtual - it stated the default speed of the shell was 150 - perhaps it's just slamming into the ground with the speed of a normal shell and I don't see it?

 

Reading even more:

Quote

speed: Number - (Optional, default 150) Descending velocity, in m/s. Default is 150, if you use flare as ammo, set it to lower value (1-5) to let it fall down slowly

 

["posit", "F_40mm_White", 20, 10, 10, {false}, 0, 250, 1] spawn BIS_fnc_fireSupportVirtual;

 

  • Like 1

Share this post


Link to post
Share on other sites
17 hours ago, Harzach said:

 

Reading even more:

 


["posit", "F_40mm_White", 20, 10, 10, {false}, 0, 250, 1] spawn BIS_fnc_fireSupportVirtual;

 

Hi Folks,

 

Thanks as well. I did see the note on flare speed - let me give that a try.  I wasn't sure what was needed for Args 6-9. I did note that the script I posted above used a different mechanism to create the flares.

 

I'm pretty much strictly SOG now and I'm using ALiVE weather. Some nights are so bright I hardly need flares - others are so dark - all I can see are my friendly troop markers. While I have flares now using a vanilla flare: "F_40mm_White" they hardly light up the environment on those darkest of nights. Even with multiple flares in the sky - I can barely make out my hand in front of my face. I tried a mod called "Brighter Flares" as the poor flare lighting seems to be a common complaint with ArmA. It doesn't seem much brighter. Are there any other tricks I can try?

 

Thanks.

 

Regards,

Scott

 

Share this post


Link to post
Share on other sites
28 minutes ago, scottb613 said:

I wasn't sure what was needed for Args 6-9

 

When you have a command or function that takes many arguments, most of them will have default values, which is why you don't have to enter values for all of them. In the case of this particular function, all arguments have a default value except for the first (the target). If you want to change any default value, you must supply a value for each preceding argument, even if it is just its default value. I'll comment my example:

["posit",					// marker name
"F_40mm_White",					// magazine class - new value
20,						// radius - new value
10,						// rounds - default
10,						// delay - default
{false},					// conditionEnd - default
0,						// safezone - default
250,						// altitude - default
1						// speed - new value
] spawn BIS_fnc_fireSupportVirtual;

Since the final argument (sounds) is not changed, I do not need to specify its value.

 

Quote

let me give that a try

 

Tested and working.

  • Like 1

Share this post


Link to post
Share on other sites
38 minutes ago, scottb613 said:

Are there any other tricks I can try?

 

You can use the SOG 40mm flares, which do seem to provide plenty of illumination:

["posit", "vn_40mm_m583_flare_w_ammo", 20, 10, 10, {false}, 0, 250, 1] spawn BIS_fnc_fireSupportVirtual;

 

  • Like 1

Share this post


Link to post
Share on other sites
17 minutes ago, Harzach said:

 

You can use the SOG 40mm flares, which do seem to provide plenty of illumination:


["posit", "vn_40mm_m583_flare_w_ammo", 20, 10, 10, {false}, 0, 250, 1] spawn BIS_fnc_fireSupportVirtual;

 

Hi Folks,

 

Thank you once again. You stated how the Args work on that function far more clearly than the Wiki did. Really appreciate your time. I'll give that flare a try as well.

 

Regards,
Scott 

Share this post


Link to post
Share on other sites

I also just tried "vn_m127_flare_ammo" which I suspect is supposed to be an illum flare dropped by C-47/C-123/C-130 flareships. It lasts more than twice as long as the 40mm flare, falling for about 530 meters, so add to that the altitude at which you want them to burn out and spawn them at that height. The lighting should be the same, but it might look cooler having them float in higher and longer.

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×