WLF Posted February 12, 2018 Report Share Posted February 12, 2018 Hi All! Trying porting one script from a2 to a3. That script have a variable "dayz_serverObjectMonitor". What a variable i need for a3? Now I have an error: 22:38:01 Error in expression <gineOn true; _aircraft flyInHeight 100; dayz_serverObjectMonitor set [count dayz> 22:38:01 Error position: <dayz_serverObjectMonitor set [count dayz> 22:38:01 Error Undefined variable in expression: dayz_serverobjectmonitor Link to comment Share on other sites More sharing options...
0 Grahame Posted February 13, 2018 Report Share Posted February 13, 2018 There are pretty much no one to one equivalents between A2 DayZ/Epoch and A3 Epoch (for one, given the two ways I described them you might see that A3 Epoch does not use another mod). Would need to see the script and need to know what it is doing with that. No guarantees of an easy solution but post up the script... after all, I intend to steal all of @salivals stuff and port it to ARMA3 salival and natoed 1 1 Link to comment Share on other sites More sharing options...
0 WLF Posted February 13, 2018 Author Report Share Posted February 13, 2018 I'm trying to port this simple script: Link to comment Share on other sites More sharing options...
0 Grahame Posted February 13, 2018 Report Share Posted February 13, 2018 Ah yes, I like that script. The script itself should run just fine in ARMA3 with a change to the classnames for the aircraft and crew and a bit of a rewrite to the player choice/location code (BIS_fnc_selectRandom should not be used anymore and replaced with selectRandom) and aircraft/crew spawning logic to make it work better and remove the FNC_getpos() calls. I'm thinking that, after making those changes, you could add the script to the EpochEvents folder in epoch_server_settings and adding a line like: { 1200, "FlyBy", 0 , 1, -1, {} ,{"VR"}}, in the server's epochconfig.hpp would probably get the script running. An alternative would be to use the new epoch_server_events mechanisms provided and create a new PBO based on the debris spawner to run all the old A2/DayZ/Epoch events. Now you have mean thinking I might check this out on my dev server myself after work. Would be really nice to port over several of the old A2 Epoch events. If I get it working before you then I will post the updated flyby here. There may also be an infiSTAR change required if you use it - I remember having to prevent infiSTAR from deleting AI jets when I was playing with it on my DayZ/Epoch server. Not sure whether that is a problem in A3 (yet) Link to comment Share on other sites More sharing options...
0 Grahame Posted February 13, 2018 Report Share Posted February 13, 2018 So... http://www.grahamecurtis.com/images/flyby.jpg Still cannot upload images or add a link to an image... Will post the code soon. Works perfectly as far as I can tell so far! Link to comment Share on other sites More sharing options...
0 Grahame Posted February 13, 2018 Report Share Posted February 13, 2018 http://www.grahamecurtis.com/epochz/images/flyby2.jpg Okay, here we go. First copy the following code: Spoiler private["_players","_model","_startpos","_endpos","_rand_player"]; switch(toLower worldName)do { case "altis": { _model = selectRandom ["O_Plane_CAS_02_F","O_T_VTOL_02_infantry_F","O_Plane_Fighter_02_F"]; _startpos = selectRandom [[25225.678,0,30007.34],[15102.79,0,30040.641],[4214.0278,0,30007.34],[25392.17,0,1303.6249],[14902.994,0,1403.5199],[4313.9233,0,1436.8231],[29987.428,0,10027.956],[29987.428,0,20017.646],[30020.727,0,25578.576],[30020.729,0,5066.4092]]; }; case "chernarus": { _model = selectRandom ["O_Plane_CAS_02_F","O_T_VTOL_02_infantry_F","O_Plane_Fighter_02_F"]; _startpos = selectRandom [[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]]; }; case "chernarusredux": { _model = selectRandom ["O_Plane_CAS_02_F","O_T_VTOL_02_infantry_F","O_Plane_Fighter_02_F"]; _startpos = selectRandom [[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]]; }; default { _model = selectRandom ["O_Plane_CAS_02_F","O_T_VTOL_02_infantry_F","O_Plane_Fighter_02_F"]; _startpos = selectRandom [[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]]; }; }; _players = allPlayers select {alive _x}; if !(_players isEqualTo []) then { _rand_player = selectRandom _players; _rand_num = ceil(random 5); _playerpos = getpos _rand_player; _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 ["C_man_pilot_F", getpos _aircraft, [], 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; }; }; }; into a file called FlyBy.sqf and move that file into the EpochEvents folder in epoch_server_settings. RePBO epoch_server_settings and upload to your server again. Add the following line to the events array in epochconfig.hpp in the @epochhive folder on your server: { 1800, "FlyBy", 0 , 1, -1, {} ,{"VR"}}, Adjust the first number to the number of seconds you want between each time the script runs. That's it! Play with the models used in the case statement at the top of FlyBy.sqf to meet your needs and add map names and adjust the initial spawn and end position if using a map other than Altis, Chernarus or Chernarus Redux... Link to comment Share on other sites More sharing options...
0 Grahame Posted February 13, 2018 Report Share Posted February 13, 2018 http://www.grahamecurtis.com/epochz/images/flyby3.jpg http://www.grahamecurtis.com/epochz/images/flyby4.jpg Link to comment Share on other sites More sharing options...
0 WLF Posted February 14, 2018 Author Report Share Posted February 14, 2018 19 hours ago, Grahame said: Ah yes, I like that script. The script itself should run just fine in ARMA3 with a change to the classnames for the aircraft and crew and a bit of a rewrite to the player choice/location code (BIS_fnc_selectRandom should not be used anymore and replaced with selectRandom) and aircraft/crew spawning logic to make it work better and remove the FNC_getpos() calls. Yes, of course, first I changed the fighter's models, unit's model, selectRandom and getPos functions. But in my version of this script I have a line: dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_aircraft]; ...from this topic: So, in arma3 this script does not work. But I commented that line and that's ok! :) And I will use your worldName's choice. :) Link to comment Share on other sites More sharing options...
Question
WLF
Hi All!
Trying porting one script from a2 to a3. That script have a variable "dayz_serverObjectMonitor". What a variable i need for a3?
Now I have an error:
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now