Code: Select all
blink_delay_on (parameter to set how long a flare is on)
blink_delay_off (parameter to set how long a flare is off)
blink_cycle_shift (parameter to set a "delay" before the blink pattern starts when triggered. For example, one of the flashing red lights at railroad crossings use a value of 0.5, which means theres a delay of 0.5 seconds after the initial trigger before the light starts it's blink pattern)
Only downside of this system: Unless something was put in place to enable some sort of pattern (like some sort of pattern string with pattern speed at the end (4)) this limits this system to only a simple wig-wag system if only using two flares. This can be tweaked by adding more flares, and flare definitions, but then excess file size would become a problem, and also requiring 3+ flares in the same spot for a simple led flasher might be unfavorable.
(4): I play another game, Rigs of Rods, which allows something like this by setting a new material with a texture animation, then calling that material as a flare. So for example, a string of code like this:
Code: Select all
anim_texture whiteflare.dds off.dds whiteflare.dds off.dds off.dds off.dds off.dds off.dds 0.8
Breaking that code block down, it's essentially the textures to be used, and the number at the end refers to how long, in seconds, the whole animation should be. The whole flash pattern will play for 0.8 seconds, then automatically repeat until it's trigger is turned off. The downside of this system is that it would be impossible to have any of these flares cast light, unless you make new materials for every single texture that does cast light, which would essentially make any def or material file a massive block of text. This would be a good system to get an idea from, however.
Original Post:
Requested a couple of times before:
(1) (2) (3)
But this request will be something a little bit different. I tried a little proof of concept to do a simple strobe light by emulating the flares for the rail road crossings, but changing the sii file up a bit. This didnt work, and caused the whole file to be ignored, but its something interesting to look into. I believe a simple flash pattern or something of the sort could be done this way. Something like the lights in the grill of this BMW:
Here's what I did:
Code: Select all
flare_blink: flare.patrol.red
{
ambient_color: (0.0000, 0.0000, 0.0000)
diffuse_color: ( 0.15632, 0.0, 0.0)
specular_color: ( 0.15911, 0.0, 0.0)
model: "/model/flare/vehicle_redl.pmd"
type: spot
range: 5.0
inner_angle: 20.0
outer_angle: 90.0
dir_type: wide
flare_inner_angle: 40.0
flare_outer_angle: 110.0
pitch_offset: -65
fade_distance: 200
fade_span: 100
blink_delay_on: 0.5
blink_delay_off: 0.5
scale_factor: 2
}
flare_blink: flare.patrol.red2
{
ambient_color: (0.0000, 0.0000, 0.0000)
diffuse_color: ( 0.15632, 0.0, 0.0)
specular_color: ( 0.15911, 0.0, 0.0)
model: "/model/flare/vehicle_redl.pmd"
type: spot
range: 5.0
inner_angle: 20.0
outer_angle: 90.0
dir_type: wide
flare_inner_angle: 40.0
flare_outer_angle: 110.0
pitch_offset: -65
fade_distance: 200
fade_span: 100
blink_delay_on: 0.5
blink_delay_off: 0.5
blink_cycle_shift: 0.5
scale_factor: 2
}
Code: Select all
00:00:15.672 : <ERROR> [unit] File '/unit/hookup/vehicle_patrol.sii', line 51:
00:00:15.672 : <ERROR> [unit] The unit 'flare.patrol.red2' of type 'flare_blink' has no attribute named 'blink_cycle_shift'.