Jump to content
Sign in to follow this  
TAW_Yonose

Repeatedly Lightning Bolt

Recommended Posts

I want to have lightning to strike randomly within this time all the time, 10 to 20 seconds.

So i put down a Module: Zeus Lightning Bolt:

Placement Radius: 500

Trigger synced to Moduel:

Axis A and B: 1200

Type: None

Activation Blufor, Repeatedly, Present

Condition: this

On Act: loops = true

Countdown/Timeout

Min: 10

Mid: 15

Max: 20

So why isent this Lightning bolt repeating?

Edited by TAW_Yonose

Share this post


Link to post
Share on other sites

I use this script for lightning

ambientLightning.sqf

//Parameters
private ["_position", "_direction", "_distance"];
_position=position player;
_distance=300;
_direction=random 360;
//Relative positionn
private "_relativePosition";
_relativePosition = [_position, _distance, _direction] call bis_fnc_relPos;

//The bold
private "_bolt";
_bolt = createvehicle ["LightningBolt", _relativePosition, [], 0, "can_collide"];
_bolt setVelocity [0, 0, -10];

//The lighting
_lighting = "lightning_F" createvehiclelocal _relativePosition;
_lighting setdir random 360;
_lighting setpos _relativePosition;

//The light source
_light = "#lightpoint" createvehiclelocal _relativePosition;
_light setpos _relativePosition;
_light setLightBrightness 30;
_light setLightAmbient [0.5, 0.5, 1];
_light setlightcolor [1, 1, 2];

//Some delay
sleep (0.2 + random 0.1);
//Clean up
deletevehicle _bolt;
deletevehicle _light;
deletevehicle _lighting;

sleep 0.8;
//Play thunder sound
//Random thunder sample
private "_thunder";
_thunder = ["thunder_1", "thunder_2"] call BIS_fnc_selectRandom;
playSound _thunder;

//Some delay
sleep (7 + random 7);

null=[]execVM "ambientLightning.sqf"; 

Share this post


Link to post
Share on other sites

will it work to have like min 10 mid 15 and max 20 and then on act. call BIS_fnc_selectRandom?

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  

×