f3cuk Posted November 23, 2014 Report Share Posted November 23, 2014 Just a little event to scare players. Doesn't do anything else but select a random player and create a formation of maximum 5 aircrafts that fly over that player and then fly out of the map. private["_model","_startpos","_endpos","_rand_player"]; _model = ["MV22","F35B","Su25_CDF","A10","Mi24_D","AV8B","Su25_TK_EP1","L39_TK_EP1","C130J_US_EP1","MQ9PredatorB_US_EP1"] call BIS_fnc_selectRandom; _startpos = [[1000.0,2.0],[3500.0,2.0],[5000.0,2.0],[7500.0,2.0],[9712.0,663.067],[12304.0,1175.07],[14736.0,2500.0],[16240.0,5000.0],[16240.0,7500.0],[16240.0,10000.0]] call BIS_fnc_selectRandom; _rand_player = playableUnits call BIS_fnc_selectRandom; if((isPlayer _rand_player) && (alive _rand_player)) then { _rand_num = ceil(random 5); _playerpos = [_rand_player] call FNC_GetPos; _number = 0; for "_i" from 1 to _rand_num do { _number = (_number + 1); [_number,_model,_startpos,_playerpos] spawn { private["_aircraft","_aigroup","_pilot","_wp1","_wp2","_cor_y","_cor_x"]; _number = _this select 0; _model = _this select 1; _startpos = _this select 2; _playerpos = _this select 3; _endpos = [0,16000,200]; call { if(_number == 1) exitWith { _cor_y = 0; _cor_x = 0; }; if(_number == 2) exitWith { _cor_y = -60; _cor_x = -60; }; if(_number == 3) exitWith { _cor_y = -60; _cor_x = 60; }; if(_number == 4) exitWith { _cor_y = -120; _cor_x = -120; }; if(_number == 5) exitWith { _cor_y = -120; _cor_x = 120; }; }; _aircraft = createVehicle [_model,[((_startpos select 0) + _cor_y),((_startpos select 1) + _cor_x),200],[],0,"FLY"]; _aircraft engineOn true; _aircraft flyInHeight 200; _aigroup = creategroup civilian; _pilot = _aigroup createUnit ["SurvivorW2_DZ",[_aircraft] call FNC_GetPos,[],0,"FORM"]; _pilot setCombatMode "BLUE"; _pilot moveindriver _aircraft; _pilot assignAsDriver _aircraft; _wp1 = _aigroup addWaypoint [[((_playerpos select 0) + _cor_y),((_playerpos select 1) + _cor_x),200],0]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointBehaviour "CARELESS"; _wp2 = _aigroup addWaypoint [[(_endpos select 0),(_endpos select 1),200],0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointBehaviour "CARELESS"; waitUntil { (_aircraft distance _endpos < 500) }; deleteVehicle _aircraft; deleteGroup _aigroup; deleteVehicle _pilot; }; }; }; SolarGod and unrealPANDA 2 Link to comment Share on other sites More sharing options...
Gr8 Posted December 14, 2014 Report Share Posted December 14, 2014 Nice little event :) Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted December 14, 2014 Report Share Posted December 14, 2014 Very nice script! I made a video so people can see what it looks like. Note that I added the "Flyby Enroute" to the script for testing purposes so I'd know when it was starting. If you want to make a random chance for this to be started, do the following: Under this line: _rand_player = playableUnits call BIS_fnc_selectRandom; and above this line: if((isPlayer _rand_player) && (alive _rand_player)) then { Add these lines: _spawnChance = 50; // Percent chance of spawning a crash number between 0 - 100 _spawnRoll = round(random 100); if (_spawnRoll <= _spawnChance) then { Adjust _spawnChance to whatever percent chance you want it to occur. Change the "private" line at the top to this: private["_model","_startpos","_endpos","_rand_player","_spawnchance","_spawnroll"]; Under these lines: deleteVehicle _aircraft; deleteGroup _aigroup; deleteVehicle _pilot; }; }; }; Add another }: so it looks like this: deleteVehicle _aircraft; deleteGroup _aigroup; deleteVehicle _pilot; }; }; }; }; Link to comment Share on other sites More sharing options...
Triage Posted December 15, 2014 Report Share Posted December 15, 2014 This is pretty cool. Link to comment Share on other sites More sharing options...
f3cuk Posted December 15, 2014 Author Report Share Posted December 15, 2014 Just a quick note on this. Some users have noticed a drop in client FPS as soon as this event spawns. This is the reason why we have decided to take it off our server for now, until we figure out what is causing it (my best bet is that some aircraft models are causing it). Link to comment Share on other sites More sharing options...
SolarGod Posted December 18, 2014 Report Share Posted December 18, 2014 it is for a Cherno? coords. Link to comment Share on other sites More sharing options...
Gr8 Posted December 19, 2014 Report Share Posted December 19, 2014 it is for a Cherno? coords. any map will work. It targets a player SolarGod 1 Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted December 19, 2014 Report Share Posted December 19, 2014 I've asked the players on my servers if they've noticed any drop in FPS with this and no one has said they've seen that happen yet. Link to comment Share on other sites More sharing options...
psychosis Posted December 21, 2014 Report Share Posted December 21, 2014 kicked by BattlEye: Waypoint Condition RemoteExec Restriction #0 Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted December 21, 2014 Report Share Posted December 21, 2014 Open your RemoteExec log, find the problem and add an exception... Link to comment Share on other sites More sharing options...
psychosis Posted December 21, 2014 Report Share Posted December 21, 2014 why RemoteExec log ?) if in waypointstatements.log : 21.12.2014 19:22:48: Daxaka (ip) guid - Condition Restriction #0 ["true", ""] [4:3 group, 1] 21.12.2014 19:22:52: [~DarK_VillaiN~] (ip) guid - Condition Restriction #0 ["true", ""] [6:3 group, 1] 21.12.2014 19:22:55: Dreykon (ip) guid - Condition Restriction #0 ["true", ""] [10:3 group, 1] 21.12.2014 19:23:03: Дунья Фистова (ip) guid - Condition Restriction #0 ["true", ""] [11:3 group, 1] 21.12.2014 19:23:10: Винни Пух (ip) guid - Condition Restriction #0 ["true", ""] [12:5 group, 1] 21.12.2014 19:24:06: Dreykon (ip) guid - Condition Restriction #0 ["true", ""] [16:5 group, 1] 21.12.2014 19:24:10: Cobaka (ip) guid - Condition Restriction #0 ["true", ""] [13:4 group, 1] Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted December 22, 2014 Report Share Posted December 22, 2014 Sorry, you need to edit the exceptions in waypointcondition.txt. Link to comment Share on other sites More sharing options...
psychosis Posted December 22, 2014 Report Share Posted December 22, 2014 if somebody need.. in remoteexec waypointcondition waypointstatement add this line : !"["true", ""]" after 5 "" Link to comment Share on other sites More sharing options...
TylerHumor Posted January 15, 2015 Report Share Posted January 15, 2015 Just a little event to scare players. Doesn't do anything else but select a random player and create a formation of maximum 5 aircrafts that fly over that player and then fly out of the map. private["_model","_startpos","_endpos","_rand_player"]; _model = ["MV22","F35B","Su25_CDF","A10","Mi24_D","AV8B","Su25_TK_EP1","L39_TK_EP1","C130J_US_EP1","MQ9PredatorB_US_EP1"] call BIS_fnc_selectRandom; _startpos = [[1000.0,2.0],[3500.0,2.0],[5000.0,2.0],[7500.0,2.0],[9712.0,663.067],[12304.0,1175.07],[14736.0,2500.0],[16240.0,5000.0],[16240.0,7500.0],[16240.0,10000.0]] call BIS_fnc_selectRandom; _rand_player = playableUnits call BIS_fnc_selectRandom; if((isPlayer _rand_player) && (alive _rand_player)) then { _rand_num = ceil(random 5); _playerpos = [_rand_player] call FNC_GetPos; _number = 0; for "_i" from 1 to _rand_num do { _number = (_number + 1); [_number,_model,_startpos,_playerpos] spawn { private["_aircraft","_aigroup","_pilot","_wp1","_wp2","_cor_y","_cor_x"]; _number = _this select 0; _model = _this select 1; _startpos = _this select 2; _playerpos = _this select 3; _endpos = [0,16000,200]; call { if(_number == 1) exitWith { _cor_y = 0; _cor_x = 0; }; if(_number == 2) exitWith { _cor_y = -60; _cor_x = -60; }; if(_number == 3) exitWith { _cor_y = -60; _cor_x = 60; }; if(_number == 4) exitWith { _cor_y = -120; _cor_x = -120; }; if(_number == 5) exitWith { _cor_y = -120; _cor_x = 120; }; }; _aircraft = createVehicle [_model,[((_startpos select 0) + _cor_y),((_startpos select 1) + _cor_x),200],[],0,"FLY"]; _aircraft engineOn true; _aircraft flyInHeight 200; _aigroup = creategroup civilian; _pilot = _aigroup createUnit ["SurvivorW2_DZ",[_aircraft] call FNC_GetPos,[],0,"FORM"]; _pilot setCombatMode "BLUE"; _pilot moveindriver _aircraft; _pilot assignAsDriver _aircraft; _wp1 = _aigroup addWaypoint [[((_playerpos select 0) + _cor_y),((_playerpos select 1) + _cor_x),200],0]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointBehaviour "CARELESS"; _wp2 = _aigroup addWaypoint [[(_endpos select 0),(_endpos select 1),200],0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointBehaviour "CARELESS"; waitUntil { (_aircraft distance _endpos < 500) }; deleteVehicle _aircraft; deleteGroup _aigroup; deleteVehicle _pilot; }; }; }; The last part of the instructions you put make no sense to me. You want me to move all of the code, just to make room for one more "};"? Three of these "};" reach the end of the left side. Was there an open space for you? deleteVehicle _aircraft; deleteGroup _aigroup; deleteVehicle _pilot; }; }; }; This is mine. Link to comment Share on other sites More sharing options...
ElDubya Posted January 15, 2015 Report Share Posted January 15, 2015 The last part of the instructions you put make no sense to me. You want me to move all of the code, just to make room for one more "};"? Three of these "};" reach the end of the left side. Was there an open space for you? deleteVehicle _aircraft; deleteGroup _aigroup; deleteVehicle _pilot; }; }; }; This is mine. Does yours work though? :) Link to comment Share on other sites More sharing options...
TNT Posted January 15, 2015 Report Share Posted January 15, 2015 nice =] Link to comment Share on other sites More sharing options...
TylerHumor Posted January 16, 2015 Report Share Posted January 16, 2015 Does yours work though? :) It doesn't seem like it. So, how am I supposed to add the other "};"? Move all of the code? Link to comment Share on other sites More sharing options...
ElDubya Posted January 16, 2015 Report Share Posted January 16, 2015 private["_model","_startpos","_endpos","_rand_player","_spawnchance","_spawnroll"]; _model = ["MV22","F35B","Su25_CDF","A10","Mi24_D","AV8B","Su25_TK_EP1","L39_TK_EP1","C130J_US_EP1","MQ9PredatorB_US_EP1"] call BIS_fnc_selectRandom; _startpos = [[1000.0,2.0],[3500.0,2.0],[5000.0,2.0],[7500.0,2.0],[9712.0,663.067],[12304.0,1175.07],[14736.0,2500.0],[16240.0,5000.0],[16240.0,7500.0],[16240.0,10000.0]] call BIS_fnc_selectRandom; _rand_player = playableUnits call BIS_fnc_selectRandom; _spawnChance = 50; // Percent chance of spawning a crash number between 0 - 100 _spawnRoll = round(random 100); if (_spawnRoll <= _spawnChance) then { if((isPlayer _rand_player) && (alive _rand_player)) then { _rand_num = ceil(random 5); _playerpos = [_rand_player] call FNC_GetPos; _number = 0; for "_i" from 1 to _rand_num do { _number = (_number + 1); [_number,_model,_startpos,_playerpos] spawn { private["_aircraft","_aigroup","_pilot","_wp1","_wp2","_cor_y","_cor_x"]; _number = _this select 0; _model = _this select 1; _startpos = _this select 2; _playerpos = _this select 3; _endpos = [0,16000,200]; call { if(_number == 1) exitWith { _cor_y = 0; _cor_x = 0; }; if(_number == 2) exitWith { _cor_y = -60; _cor_x = -60; }; if(_number == 3) exitWith { _cor_y = -60; _cor_x = 60; }; if(_number == 4) exitWith { _cor_y = -120; _cor_x = -120; }; if(_number == 5) exitWith { _cor_y = -120; _cor_x = 120; }; }; _aircraft = createVehicle [_model,[((_startpos select 0) + _cor_y),((_startpos select 1) + _cor_x),200],[],0,"FLY"]; _aircraft engineOn true; _aircraft flyInHeight 200; _aigroup = creategroup civilian; _pilot = _aigroup createUnit ["SurvivorW2_DZ",[_aircraft] call FNC_GetPos,[],0,"FORM"]; _pilot setCombatMode "BLUE"; _pilot moveindriver _aircraft; _pilot assignAsDriver _aircraft; _wp1 = _aigroup addWaypoint [[((_playerpos select 0) + _cor_y),((_playerpos select 1) + _cor_x),200],0]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointBehaviour "CARELESS"; _wp2 = _aigroup addWaypoint [[(_endpos select 0),(_endpos select 1),200],0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointBehaviour "CARELESS"; waitUntil { (_aircraft distance _endpos < 500) }; deleteVehicle _aircraft; deleteGroup _aigroup; deleteVehicle _pilot; }; }; }; }; Link to comment Share on other sites More sharing options...
TylerHumor Posted January 19, 2015 Report Share Posted January 19, 2015 Does yours work though? :) How would I make the script spawn multiple vehicles at once, maybe flying in a row or after each other? The script/event works. :D Link to comment Share on other sites More sharing options...
Pasquale Posted January 30, 2015 Report Share Posted January 30, 2015 how to enable event? Link to comment Share on other sites More sharing options...
Luggz Posted February 9, 2015 Report Share Posted February 9, 2015 Ok stupid question where do you put this? Link to comment Share on other sites More sharing options...
Gr8 Posted February 9, 2015 Report Share Posted February 9, 2015 Ok stupid question where do you put this? Put this in your modules folder in your server PBO Link to comment Share on other sites More sharing options...
ognims Posted February 12, 2015 Report Share Posted February 12, 2015 Put this in your modules folder in your server PBO Do i need to add this to the init / EpochEvents ? and what do i put in there ? Link to comment Share on other sites More sharing options...
calamity Posted February 16, 2015 Report Share Posted February 16, 2015 Do i need to add this to the init / EpochEvents ? and what do i put in there ? yes I added it like this..... I named it flybye.sqf ,["any","any","any","any",34,"flybye"] Link to comment Share on other sites More sharing options...
ognims Posted February 17, 2015 Report Share Posted February 17, 2015 yes I added it like this..... I named it flybye.sqf ,["any","any","any","any",34,"flybye"] Thnx buddy! :D Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now