Jump to content
BlackbirdSD

Have flares shoot off every 30 seconds?

Recommended Posts

Which flares?  The ones from the starter pistol, the ones fired from under-barrel 40mm grenade launchers, modded ones, ...?

Share this post


Link to post
Share on other sites

1.  Have a practise.  Create a trigger, walk into the trigger and watch the flare fire.

 

2, Place a man on a road in an out of the way place. Have him run through a trigger, use a cycle way point so that he runs back and forth. Every time he runs through the trigger a flare fires.

 

3. Now make it to that when he runs through a trigger at location "A"  a flare fires at location "B".

 

Out of interest this works for all explosives, artillery, mortars hand grenades, aircraft bombs, everything.

.

 

 

 

 

  • Confused 2

Share this post


Link to post
Share on other sites

@BlackbirdSD,

Here's a simple flare function,

you_flare={
params [["_pos", player], ["_color", "red"], ["_time", 30], ["_area", [0,100,200]]];

missionNameSpace setVariable ["do_flares", true];

	while {missionNameSpace getVariable ["do_flares", false]} do {
	private	_flr = (format ["F_20mm_%1", _color]) createvehicle (_pos ModelToWorld _area); 
		_flr setVelocity [0,0,-10];
	sleep _time
	}
};

[] spawn you_flare

You may configure the spawn params to customize the effect.
 

Spoiler

based on:

 



Have fun!

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, wogz187 said:

@BlackbirdSD,

Here's a simple flare function,


you_flare={
params [["_pos", player], ["_color", "red"], ["_time", 30], ["_area", [0,100,200]]];

missionNameSpace setVariable ["do_flares", true];

	while {missionNameSpace getVariable ["do_flares", false]} do {
	private	_flr = (format ["F_20mm_%1", _color]) createvehicle (_pos ModelToWorld _area); 
		_flr setVelocity [0,0,-10];
	sleep _time
	}
};

[] spawn you_flare

You may configure the spawn params to customize the effect.
 

  Hide contents

based on:

 



Have fun!

Does this get put in a trigger?

Share this post


Link to post
Share on other sites

@BlackbirdSD,
To spawn anything in a trigger you need a handle or a call scope,

you_flare={
params [["_pos", player], ["_color", "red"], ["_time", 30], ["_area", [0,100,200]]];

missionNameSpace setVariable ["do_flares", true];

	while {missionNameSpace getVariable ["do_flares", false]} do {
	private	_flr = (format ["F_20mm_%1", _color]) createvehicle (_pos ModelToWorld _area); 
		_flr setVelocity [0,0,-10];
	sleep _time
	}
};
call {
[] spawn you_flare
}

You may paste the above in the On Activation field of a trigger.

Share this post


Link to post
Share on other sites
14 hours ago, wogz187 said:

@BlackbirdSD,
To spawn anything in a trigger you need a handle or a call scope,


you_flare={
params [["_pos", player], ["_color", "red"], ["_time", 30], ["_area", [0,100,200]]];

missionNameSpace setVariable ["do_flares", true];

	while {missionNameSpace getVariable ["do_flares", false]} do {
	private	_flr = (format ["F_20mm_%1", _color]) createvehicle (_pos ModelToWorld _area); 
		_flr setVelocity [0,0,-10];
	sleep _time
	}
};
call {
[] spawn you_flare
}

You may paste the above in the On Activation field of a trigger.

Thats awsome thanks.  Only problem is the flare isnt as bright as the one shot from the grenade launcher.  Any idea why?

Thanks

Share this post


Link to post
Share on other sites

He has used a 20mm flare instead of a 40mm flare

Share this post


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

He has used a 20mm flare instead of a 40mm flare

40mm is much better.

Thanks

Share this post


Link to post
Share on other sites
On 2/18/2021 at 10:57 AM, wogz187 said:

@BlackbirdSD,

Here's a simple flare function,


you_flare={
params [["_pos", player], ["_color", "red"], ["_time", 30], ["_area", [0,100,200]]];

missionNameSpace setVariable ["do_flares", true];

	while {missionNameSpace getVariable ["do_flares", false]} do {
	private	_flr = (format ["F_20mm_%1", _color]) createvehicle (_pos ModelToWorld _area); 
		_flr setVelocity [0,0,-10];
	sleep _time
	}
};

[] spawn you_flare

You may configure the spawn params to customize the effect.
 

  Reveal hidden contents

based on:

 



Have fun!

Can you explain how these parts work?     ["_area", [0,100,200]]]; and _flr setVelocity [0,0,-10];    

Thanks

Share this post


Link to post
Share on other sites

Set velocity is to have it move downward upon spawn, _area is a misleading name (so is _pos btw) as it's used by modelToWorld to determine where in relation to the player the flare will spawn.  In this case, 200 meters above the player and 100 meters in front (I think, might be off to the sides as well)

Share this post


Link to post
Share on other sites
13 hours ago, stanhope said:

Set velocity is to have it move downward upon spawn, _area is a misleading name (so is _pos btw) as it's used by modelToWorld to determine where in relation to the player the flare will spawn.  In this case, 200 meters above the player and 100 meters in front (I think, might be off to the sides as well)

How do I make each flare random within a 100m radius?

Share this post


Link to post
Share on other sites
private _flr = (format ["F_20mm_%1", _color]) createvehicle (_pos getPos [10 + random 90, random 360]);

 

Share this post


Link to post
Share on other sites
3 hours ago, stanhope said:

private _flr = (format ["F_20mm_%1", _color]) createvehicle (_pos getPos [10 + random 90, random 360]);

 

thank you ill try it

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

×