Jump to content

Jigsor

Member
  • Content Count

    628
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by Jigsor

  1. Both of these work style = 48 + 0x800; // ST_PICTURE + ST_KEEP_ASPECT_RATIO style = 0x30 + 0x800; This is an Arma 2 font. font = "Zeppelin32"; so for A3 try font = "PuristaMedium";
  2. Jigsor

    =BTC= Logistic [A3] - BETA

    I've downloaded version 0.13 and pasted in your Beta 0.6 amendments. Is that what I should have done?
  3. Jigsor

    =BTC= Logistic [A3] - BETA

    Same here. I can report no lift hud, though not getting any script errors. Not yet tested on dedi because it's not working on hosted server. I've reverted to an older working version for now. I hope you get it worked out. Thanks for keeping this going Beerkan.
  4. Jigsor

    Spawned AI With Init

    This has no reference in that context. Try passing _unit instead of this. Also keep in mind you are spawning a new processing thread each time a unit is created with that method. It may be more efficient to add your code to the function instead.
  5. Seen this before.. This may help. You may also be able to createvehicle "infrared item" in the killed eventhadler as well. http://forums.bistudio.com/showthread.php?143041-Death-Marker-script
  6. You can't use local variables like that in a trigger, but you could put that code in a script and run it from your trigger activation and use thislist like Egg says to execute on all who are in trigger area. trigger Act: {nul = [] execVM "change_loadout.sqf";} foreach thisList; on second look of you code. That code doesn't really make sense, but I see what you are trying to do. Maybe replace _wep1 with player and set trigger for repeating. Just an idea..
  7. Yes it is possible. Here is a solution for same situation. You can change the _x setMarkercolor "ColorRed" part in trigger to _x setMarkerAlpha 1 in order to unhide markers for JIP. Marker states will be updated for JIP 30 seconds after connected. http://forums.bistudio.com/showthread.php?178866-Update-marker-color-on-dedicated-server-for-all-players-amp-JIP&p=2708017#post2708017
  8. Jigsor

    Takistan buildings in Arma 3?

    I don't think all map objects have class names. However there are mods that add class names to structures. Downside is the mod becomes a mission requirement.
  9. Jigsor

    Locality Issue

    Dunno about above, seems complicated... This works for me. //init.sqf // Init Player if (!isdedicated && hasInterface) then { [] spawn { waitUntil {!isNull player}; waitUntil {player == player}; call compile preprocessFile "client_fncs.sqf"; player addEventHandler ["killed", {_nul = _this call killedInfo_fnc}]; }; }; //client_fncs.sqf killedInfo_fnc = { // Generates killed by whom, weapon used and distance from killer message. _killed = _this select 0; _killer = _this select 1; [_killed,_killer] spawn { _killed = _this select 0; _killer = _this select 1; _killerName = name _killer; _killerWeapon = currentWeapon _killer; _killerWeaponName = getText (configFile >> "CfgWeapons" >> _killerWeapon >> "displayName"); _distance = _killed distance _killer; sleep 7;// this works well with my BTC revive settings. Change as needed _text = format ["Killed by %1, from %2 meters, with %3",_killerName, str(_distance), str(_killerWeaponName)]; copyToClipboard str(_text); cutText [_text,"PLAIN DOWN"]; }; }; No logging in this example only in game message for the player that gets killed
  10. Jigsor

    Ghost Scripts

    Ghost, your scripts are top notch and I've learned several things from them as well. Thank you for your contributions and dedication. We also enjoy your missions very much and recommend them to anybody looking for great coop. I've managed to put together a working insurgency mission that spawns intel and ammo caches using your scripts. They are adapted of course. All credits are given in and Notes.txt within mission pbo and withing script headers. It working great. Even JIP addaction on server spawned intel is worked out without persistent param in BIS_mp_fnc. I saw your post in Ghost Missions regarding: "Still have random tasks being destroyed on spawn occasionally and not sure what is causing that." I have experienced that as well in your missions and never knew what that was about until I started using your scripts/functions. Occasionally ammo caches and intel dissapear with no known cause. I've got a handle damage on the ammo cache to allow damage only from certain explosives, but they still dissapear, get deleted, or get destroyed. Not sure which , but the object becomes null nonetheless. I can't trace the problem within any of the scripts. I monitored cache placement to make sure it was not a collision problem and it isn't. I've caught the caches dissapearing before my eyes trying to debug. I just can't figure it out. I know your a busy guy and I'm not asking for you to take a look at the mission though that would be great, but if you do resolve this matter I would be very interested in the whys and hows. Keep up the great work and looking forward to the new missions. Thank You.
  11. Jigsor

    Trixie's Release Thread

    Thank you for the smaw launcher with optic Trixie. It was something we really needed. All seems fine with that mod except the sound. Don't know if this has been reported here yet. If it has, I apologize. As reported by many players the sound is like a blown woofer. Maybe it was clipping or over driven a bit to much during capture of audio? Nonetheless, great job. This one will probably get added to the server. Will try out the other mods. Thanks again!
  12. if ((date select 3) < 6 or (date select 3) > 19) then {_nightime = true} else {_daytime = true};
  13. Jigsor

    Init.SQF Optimization

    Not sure what the problem is exactly, but you may look into uiSleep. I've used it before in init.sqf and it helped delay map at briefing until everything was loaded. Had to play with exact amount of sleep. The A2 mission in my sig uses it.
  14. Csat ammo boxes or all ammo boxes from my understanding belong to civilian. So I'm blufor and my objective is to destroy enemy ammo cache "Box_East_Ammo_F". If I destroy ammo cache I get -1 point on heavy vehicle and -3 total. Fine, I have and eventhandler "killed" on ammo box that adds score to the guy who destroyed it. If want to award 15 point to the player, I actually have to award 18 points to compensate negative score. OK, got that sorted ,but scoreboard still shows a -1 for the heavy armor as record. Is there away to turn that negative to positive or hide/get rid of it? Related negative score bug:http://feedback.arma3.com/view.php?id=11505
  15. _cache spawn { sleep 1; _this setDamage 1; sleep 3; Did the trick. It works perfectly! Thank you Tajin.
  16. No luck Tajin. The results are the same. Still negative score. If no return of damage at end of function by commenting //_damage the result is also the same.
  17. Thanks for the suggestions guys. SetDamage sounds like it will work, but testing this function gives me the same results. I'd like to keep scoreboard if I can make it work. I already had handledamage eventhandler limiting what munitions could destroy cache. Killed eventhandler is now removed and scoring is in handledamage eventhandler. _ammocache = createVehicle [_objtype , position cur_cache_pos, [], 0, "None"]; sleep 0.1; //_ammocache addEventHandler ["killed", {handle = [(_this select 0),(_this select 1)] execVM "scripts\AmmoCache_Score.sqf"}]; _ammocache addeventhandler ["handledamage",{_this call ammmoCache_handleDamage}]; I still get a negative 3 score with both of these edits. Removing refference of source does not have effect handledamage Passed array: [unit, selectionName, damage, source, projectile] JIG_ammmoCache_damage = { _cache = _this select 0; _damage = _this select 2; _source = _this select 3; _ammo = _this select 4; if ((_ammo == "satchelCharge_remote_ammo") || (_ammo == "demoCharge_remote_ammo")) then { //--- Increase damage, add score, remove eventhandler, delete cache box //_damage = _damage * 3; _cache setDamage 1; _cache removeAllEventHandlers "handledamage"; _pScore = 18; _source addScore _pScore; paddscore = [_source, _pscore]; publicVariable "paddscore"; deleteVehicle _cache; } else { _damage = 0; }; _damage }; JIG_ammmoCache_damage = { _cache = _this select 0; _damage = _this select 2; //_source = _this select 3; _ammo = _this select 4; if ((_ammo == "satchelCharge_remote_ammo") || (_ammo == "demoCharge_remote_ammo")) then { //--- Increase damage, add score, remove eventhandler, delete cache box //_damage = _damage * 3; _cache setDamage 1; _cache removeAllEventHandlers "handledamage"; //_pScore = 18; //_source addScore _pScore; //paddscore = [_source, _pscore]; publicVariable "paddscore"; deleteVehicle _cache; } else { _damage = 0; }; _damage }; Is it not possible to handle scoring and limit damage on objects that do not belong to opposing side through bis eventhandler?
  18. Try this. Its a slightly modified method from eos. // init.sqf if (isServer) then { call compile preprocessFile "server_fncs.sqf"; }; if (isServer) then { [] spawn { waitUntil{!(isNil "BIS_fnc_init")}; onplayerConnected {[] spawn {sleep 30; call JIPmkr_updateClient_fnc;};}; }; }; // server_fncs.sqf JIPmkr_updateServer_fnc = { private ["_JIPmkr","_coloredMarkers"]; _JIPmkr = ["mkr1","mkr2","mkr3","mkr4","mkr5"];// all markers that could possibly change color durring mission { if (isNil {server getVariable "ZoneMarkers"}) then { _coloredMarkers=[]; _coloredMarkers set [count _coloredMarkers,_x]; server setvariable ["ZoneMarkers",_coloredMarkers,true]; } else { _coloredMarkers=server getvariable "ZoneMarkers"; if (isnil "_coloredMarkers") then {_coloredMarkers=[];}; _coloredMarkers set [count _coloredMarkers,_x]; server setvariable ["ZoneMarkers",_coloredMarkers,true]; }; }foreach _JIPmkr; }; JIPmkr_updateClient_fnc = { _coloredMarkers=server getvariable "ZoneMarkers"; {_x setMarkerAlpha (MarkerAlpha _x); _x setMarkercolor (getMarkercolor _x); }foreach _coloredMarkers; }; Place a game logic and name it server. Add this to your trigger activation. Add/remove marker names that will change color when trigger activated as you see fit. {_x setMarkercolor "ColorRed"} foreach ["mkr2","mkr3","mkr4","mkr5"]; call JIPmkr_updateServer_fnc;
  19. If the vehicle or object has a wreck model then second example would be better, but the first example should work if the vehicle is not alive just as well. Change 4 to 1 in second example to check for only 1 wreck. if (!alive (nearestObject [damage_pos_logic, "B_MRAP_01_hmg_F"])) then { _vec1destroyed = true; } else { _vec1destroyed = false; };//checks if "B_MRAP_01_hmg_F" is alive near invisible helipad named damage_pos_logic. nearestObject checks up to 50 meters away. _destroyed_objects = nearestObjects [damage_pos_logic, ["Land_Wreck_Hunter_F"], 50]; if ((count _destroyed_objects) < 4) then { _wreck1_detected = false; } else { _wreck1_detected = true; };//checks if there are 4 "Land_Wreck_Hunter_F" damage models withing specified 50 meter radius of invisible helipad named damage_pos_logic.
  20. You'll need to specify a direction in bis_fnc_spawnvehicle and use setVelocity. I use a function to make markers, move logics and spin the logics in the direction aircraft will be initially spawning and traveling. This is how the function works. Function Air_Dest_fnc makes spawn marker and An AO or destination marker. Function then spins spawn marker in direction of AO marker Function then moves a preplaced logic like invisible helipad named air_pat_east to spawn position marker and spins it in direction of AO marker. For me its been more reliable to use preplaced logics then move them when you need by script or function. Logic names are air_pat_pos and air_pat_east The choppers need to be handled slightly different from fixed wing. This is working flawlessly. Hopefully this will give you an idea. Air_Dest_fnc = { //Air_Dest_fnc by Jigsor private ["_posHpad","_posnewAO","_currentmarker","_wpcyclemark","_spwnaire","_spwnairepos","_spwnairedir","_spwnairw","_spwnairwpos","_spwnairwdir","_spwnairdire","_spwnairenewdir","_spwnairdirw","_spwnairwnewdir"]; _posHpad = [ getPosATL air_pat_pos select 0, (getPosATL air_pat_pos select 1)]; if (!isNil "oamarker") then { _posnewAO = [ getMarkerPos "oamarker" select 0, (getMarkerPos "oamarker" select 1)]; if (_posHpad distance _posnewAO == 0) exitwith {}; if !(_posHpad distance _posnewAO == 0) then { //sleep 5; sleep 0.2; deleteMarker "oamarker"; _currentmarker = createMarker ["oamarker", getposATL air_pat_pos]; _currentmarker setMarkerShape "ELLIPSE"; "oamarker" setMarkerSize [1, 1]; "oamarker" setMarkerShape "ICON"; "oamarker" setMarkerType "mil_dot";//set marker type to "mil_dot" for debug. Set "Empty" for invisible "oamarker" setMarkerColor "ColorRed";//ColorRedAlpha "ColorRed" "oamarker" setMarkerText "Enemy Occupied"; "oamarker" setMarkerPos (getposATL air_pat_pos); publicVariable "oamarker"; //publicVariable "air_pat_pos"; sleep 0.2; if (!isNil "cyclewpmrk") then {deleteMarker "cyclewpmrk";}; _wpcyclemark = createMarker ["cyclewpmrk", getposATL air_pat_pos]; _wpcyclemark setMarkerShape "ELLIPSE"; "cyclewpmrk" setMarkerSize [1, 1]; "cyclewpmrk" setMarkerShape "ICON"; "cyclewpmrk" setMarkerType "Empty";//set marker type to "mil_dot" for debug. Set "Empty" for invisible "cyclewpmrk" setMarkerColor "ColorRed"; "cyclewpmrk" setMarkerText "WPcycle"; "cyclewpmrk" setMarkerPos [(getMarkerPos "oamarker" select 0) + (2800 * sin floor(random 360)), (getMarkerPos "oamarker" select 1) + (2800 * cos floor(random 360)), 0];//cycle waypoint distance is 2800 meters from AO marker publicVariable "cyclewpmrk"; sleep 0.2; air_pat_cycle setPosATL getMarkerPos "cyclewpmrk"; if (!isNil "spawnaire") then {deleteMarker "spawnaire";}; _spwnaire = createMarker ["spawnaire", getposATL air_pat_pos]; _spwnaire setMarkerShape "ELLIPSE"; _spwnairepos = getMarkerPos "cyclewpmrk"; _spwnairedir = [_spwnairepos, air_pat_pos] call BIS_fnc_dirTo; "spawnaire" setMarkerSize [1, 1]; "spawnaire" setMarkerShape "ICON"; "spawnaire" setMarkerType "Empty";//set marker type to "mil_dot" for debug. Set "Empty" for invisible "spawnaire" setMarkerColor "ColorRed"; "spawnaire" setMarkerText "SpawnAirEst"; "spawnaire" setMarkerPos [(getMarkerPos "oamarker" select 0) + (2800 * sin (_spwnairedir -300)), (getMarkerPos "oamarker" select 1) + (2800 * cos (_spwnairedir -300)), 0];//East Air spawn point distance is 2800 meters from AO marker _spwnairdire = getMarkerPos "spawnaire"; _spwnairenewdir = [_spwnairdire, air_pat_pos] call BIS_fnc_dirTo; "spawnaire" setMarkerDir _spwnairenewdir;//point marker direction towards oamarker publicVariable "spawnaire"; sleep 0.2; //air_pat_east setPosATL _spwnairdire; air_pat_east setPosATL getMarkerPos "spawnaire"; air_pat_east setDir _spwnairenewdir; if (!isNil "spawnairw") then {deleteMarker "spawnairw";}; _spwnairw = createMarker ["spawnairw", getposATL air_pat_pos]; _spwnairw setMarkerShape "ELLIPSE"; "spawnairw" setMarkerSize [1, 1]; "spawnairw" setMarkerShape "ICON"; "spawnairw" setMarkerType "Empty";//set marker type to "mil_dot" for debug. Set "Empty" for invisible "spawnairw" setMarkerColor "ColorRed"; "spawnairw" setMarkerText "Retreat"; "spawnairw" setMarkerPos [(getMarkerPos "oamarker" select 0) + (2800 * sin (_spwnairedir -60)), (getMarkerPos "oamarker" select 1) + (2800 * cos (_spwnairedir -60)), 0];//East Air spawn point distance is 2800 meters from AO marker _spwnairdirw = getMarkerPos "spawnairw"; _spwnairwnewdir = [_spwnairdirw, air_pat_pos] call BIS_fnc_dirTo; "spawnairw" setMarkerDir _spwnairwnewdir;//point marker direction towards oamarker publicVariable "spawnairw"; sleep 0.1; //air_pat_west setPosATL _spwnairdirw; air_pat_west setPosATL getMarkerPos "spawnairw"; air_pat_west setDir _spwnairwnewdir; //markersready = true; //publicVariable "markersready";// required for airpate1.sqf }; } else { if (isNil "oamarker") then { _currentmarker = createMarker ["oamarker", getposATL air_pat_pos]; _currentmarker setMarkerShape "ELLIPSE"; "oamarker" setMarkerSize [1, 1]; "oamarker" setMarkerShape "ICON"; "oamarker" setMarkerType "mil_dot";//set marker type to "mil_dot" for debug. Set "Empty" for invisible "oamarker" setMarkerColor "ColorRed"; "oamarker" setMarkerText "Enemy Occupied"; "oamarker" setMarkerPos (getposATL air_pat_pos); publicVariable "oamarker"; //publicVariable "air_pat_pos"; sleep 0.2; _wpcyclemark = createMarker ["cyclewpmrk", getposATL air_pat_pos]; _wpcyclemark setMarkerShape "ELLIPSE"; "cyclewpmrk" setMarkerSize [1, 1]; "cyclewpmrk" setMarkerShape "ICON"; "cyclewpmrk" setMarkerType "Empty";//set marker type to "mil_dot" for debug. Set "Empty" for invisible "cyclewpmrk" setMarkerColor "ColorRed"; "cyclewpmrk" setMarkerText "WPcycle"; "cyclewpmrk" setMarkerPos [(getMarkerPos "oamarker" select 0) + (2800 * sin floor(random 360)), (getMarkerPos "oamarker" select 1) + (2800 * cos floor(random 360)), 0];//cycle waypoint distance is 2800 meters from AO marker publicVariable "cyclewpmrk"; sleep 0.2; air_pat_cycle setPosATL getMarkerPos "cyclewpmrk"; _spwnaire = createMarker ["spawnaire", getposATL air_pat_pos]; _spwnaire setMarkerShape "ELLIPSE"; _spwnairepos = getMarkerPos "cyclewpmrk"; _spwnairedir = [_spwnairepos, air_pat_pos] call BIS_fnc_dirTo; "spawnaire" setMarkerSize [1, 1]; "spawnaire" setMarkerShape "ICON"; "spawnaire" setMarkerType "Empty";//set marker type to "mil_dot" for debug. Set "Empty" for invisible "spawnaire" setMarkerColor "ColorRed"; "spawnaire" setMarkerText "SpawnAirEst"; "spawnaire" setMarkerPos [(getMarkerPos "oamarker" select 0) + (2800 * sin (_spwnairedir -300)), (getMarkerPos "oamarker" select 1) + (2800 * cos (_spwnairedir -300)), 0];//East Air spawn point distance is 2800 meters from AO marker _spwnairdire = getMarkerPos "spawnaire"; _spwnairenewdir = [_spwnairdire, air_pat_pos] call BIS_fnc_dirTo; "spawnaire" setMarkerDir _spwnairenewdir;//point marker direction towards oamarker publicVariable "spawnaire"; sleep 0.2; //air_pat_east setPosATL _spwnairdire; air_pat_east setPosATL getMarkerPos "spawnaire"; air_pat_east setDir _spwnairenewdir; _spwnairw = createMarker ["spawnairw", getposATL air_pat_pos]; _spwnairw setMarkerShape "ELLIPSE"; "spawnairw" setMarkerSize [1, 1]; "spawnairw" setMarkerShape "ICON"; "spawnairw" setMarkerType "Empty";//set marker type to "mil_dot" for debug. Set "Empty" for invisible "spawnairw" setMarkerColor "ColorRed"; "spawnairw" setMarkerText "Retreat"; "spawnairw" setMarkerPos [(getMarkerPos "oamarker" select 0) + (2800 * sin (_spwnairedir -60)), (getMarkerPos "oamarker" select 1) + (2800 * cos (_spwnairedir -60)), 0];//East Air spawn point distance is 2800 meters from AO marker _spwnairdirw = getMarkerPos "spawnairw"; _spwnairwnewdir = [_spwnairdirw, air_pat_pos] call BIS_fnc_dirTo; "spawnairw" setMarkerDir _spwnairwnewdir;//point marker direction towards oamarker publicVariable "spawnairw"; sleep 0.2; //air_pat_west setPosATL _spwnairdirw; air_pat_west setPosATL getMarkerPos "spawnairw"; air_pat_west setDir _spwnairwnewdir; //markersready = true; //publicVariable "markersready";// required for airpate1.sqf }; }; }; // AirPatrolEast.sqf by Jigsor // runs from init_server.sqf // nul = [] execVM "scripts\AirPatrolEast.sqf"; if (!isServer) exitWith {}; private ["_currentmarker","_newPosAELogic","_newPosAELogicMrk","_aire1","_aire2","_aire3"]; sleep 20;//wait for markers and logics airhunterE1 = ObjNull; airhunterE2 = ObjNull; airhunterE3 = ObjNull; if (DebugEnabled > 0) then { if (!isNil "curAEspawnpos") then {deleteMarker "curAEspawnpos";}; _currentmarker = createMarker ["curAEspawnpos", getMarkerPos "spawnaire"]; _currentmarker setMarkerShape "ELLIPSE"; "curAEspawnpos" setMarkerSize [2, 2]; "curAEspawnpos" setMarkerShape "ICON"; "curAEspawnpos" setMarkerType "mil_dot";//"Empty" "curAEspawnpos" setMarkerColor "ColorOrange"; "curAEspawnpos" setMarkerText "SpawnAirInitial"; publicVariable "curAEspawnpos"; sleep 2; _newPosAELogic = getPos EastAirLogic; _newPosAELogicMrk = getMarkerPos "curAEspawnpos"; }; // Modded Jets _aire1 = [] spawn { airhunterE1 = ObjNull; random_w_player1 = ObjNull; "airhunterE1" addPublicVariableEventHandler {call compile format ["%1",_this select 1]}; "random_w_player1" addPublicVariableEventHandler {call compile format ["%1",_this select 1]}; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { if ((isNull airhunterE1) || (not(alive airhunterE1))) then { private ["_speed","_SAdir","_randomAltitudes","_maxalt","_height","_randomTypes","_maxtype","_type","_vehicle","_veh","_vehgrp","_vel","_VarHunterName","_wp0","_spwnairdir","_poscreate"]; sleep AirRespawnDelay; //call AirEast_move_logic_fnc; if (PatroleWPmode > 0) then { random_w_player1 = ObjNull; publicVariable "random_w_player1"; sleep 3; call find_me3_fnc; sleep 3; //diag_log text format ["airhunterE1 West Human Target3: %1", random_w_player1]; }; _poscreate = getMarkerPos "spawnaire"; _speed = 180;// starting speed _SAdir = getDir air_pat_east;// Velocity Direction _spwnairdir = [getPosATL air_pat_east, getPosATL air_pat_pos] call BIS_fnc_dirTo;// Spawn Direction _randomAltitudes = [275,375,475,575];// random altitudes _maxalt = (count _randomAltitudes)-1;// count random altitudes _height = _randomAltitudes select (round random _maxalt);// select random altitude _randomTypes = ["JS_JC_SU35","IVORY_MIG29K_1"]; //_randomTypes = ["M2000C_CAS_GBU","M2000C","M2000C_CAP"];// A3 HAFM Mod //can't lock on to _maxtype = (count _randomTypes)-1;// count random types _type = _randomTypes select (round random _maxtype);// select random type _vehicle = [getPosATL air_pat_east, _SAdir, _type, EAST] call bis_fnc_spawnvehicle; sleep jig_tvt_globalsleep; _veh = _vehicle select 0; _vel = velocity _veh; _veh setpos [(_poscreate select 0) + (sin (_spwnairdir -180)), (_poscreate select 1) + (cos (_spwnairdir -180)), _height]; _veh setVelocity [(_vel select 0)+(sin _SAdir*_speed),(_vel select 1)+ (cos _SAdir*_speed),(_vel select 2)]; _vehgrp = _vehicle select 2 ;// group of vehicle if (BTC_p_skill == 1) then {[_vehgrp] call BTC_AI_init;}; _veh addEventHandler ["killed", {handle = [_this select 0] execVM "Scripts\bury.sqf"}]; {_x addEventHandler ["killed", {handle = [_this select 0] execVM "Scripts\bury.sqf"}]} forEach (units _vehgrp); _VarHunterName = "airhunterE1"; _veh setVehicleVarName _VarHunterName; _veh Call Compile Format ["%1=_This ; PublicVariable ""%1""",_VarHunterName]; // Initial Waypoint _wp0 = _vehgrp addWaypoint [getPosATL air_pat_east, 200]; _wp0 setWaypointType "MOVE"; _wp0 setWaypointBehaviour "AWARE"; _wp0 setWaypointCombatMode "green"; _wp0 setWaypointStatements ["true", ""]; if (!isNull random_w_player1) then { // Hunt Player nul = [airhunterE1,3000,random_w_player1] call find_west_target_fnc; } else { // Guard Towns nul = [airhunterE1] call east_AO_guard_cycle_wp; }; waitUntil {sleep 1; (!alive _veh) || ((count crew _veh) < 1) || (!canmove _veh)}; if (((count crew _veh) < 1) && (alive _veh)) then {_veh setDamage 1}; { if (alive _x) then {_x setDamage 1; sleep 0.1} } forEach (crew _veh); if (!alive _veh) then { { if (alive _x) then {_x setDamage 1; sleep 0.1} } forEach (units _vehgrp); }; if (alive _veh) then { _veh setDamage 1; { if (alive _x) then {_x setDamage 1; sleep 0.1} } forEach (units _vehgrp); }; }; sleep (random 600); }; }; sleep (random 600); // Stock A3 Choppers _aire2 = [] spawn { airhunterE2 = ObjNull; random_w_player2 = ObjNull; "airhunterE2" addPublicVariableEventHandler {call compile format ["%1",_this select 1]}; "random_w_player2" addPublicVariableEventHandler {call compile format ["%1",_this select 1]}; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { if ((isNull airhunterE2) || (not(alive airhunterE2))) then { private ["_speed","_SAdir","_randomAltitudes","_maxalt","_height","_randomTypes","_maxtype","_type","_vehicle","_veh","_vehgrp","_vel","_VarHunterName","_wp0","_spwnairdir","_poscreate"]; sleep AirRespawnDelay; //call AirEast_move_logic_fnc; if (PatroleWPmode > 0) then { random_w_player2 = ObjNull; publicVariable "random_w_player2"; sleep 3; call find_me2_fnc; sleep 3; //diag_log text format ["AirhunterE2 West Human Target2: %1", random_w_player2]; }; _poscreate = getMarkerPos "spawnaire"; _speed = 70;// starting speed _SAdir = getDir air_pat_east;// Velocity Direction _spwnairdir = [getPosATL air_pat_east, getPosATL air_pat_pos] call BIS_fnc_dirTo;// Spawn Direction _randomAltitudes = [50,75,100];// random altitudes _maxalt = (count _randomAltitudes)-1;// count random altitudes _height = _randomAltitudes select (round random _maxalt);// select random altitude _randomTypes = ["O_Heli_Attack_02_black_F"];// stock A3 choppers. Only "O_Heli_Attack_02_black_F" will engage infantry _maxtype = (count _randomTypes)-1;// count random types _type = _randomTypes select (round random _maxtype);// select random type _vehicle = [getPosATL air_pat_east, _SAdir, _type, EAST] call bis_fnc_spawnvehicle; sleep jig_tvt_globalsleep; _veh = _vehicle select 0; _vel = velocity _veh; _veh setpos [(_poscreate select 0) + (sin (_spwnairdir -180)), (_poscreate select 1) + (cos (_spwnairdir -180)), _height]; //_veh setpos (_veh modelToWorld [(_poscreate select 0) + (sin (_spwnairdir -180)), (_poscreate select 1) + (cos (_spwnairdir -180)), _height]); _veh setVelocity [(_vel select 0)+(sin _SAdir*_speed),(_vel select 1)+ (cos _SAdir*_speed),(_vel select 2)]; _vehgrp = _vehicle select 2 ;// group of vehicle if (BTC_p_skill == 1) then {[_vehgrp] call BTC_AI_init;}; _veh addEventHandler ["killed", {handle = [_this select 0] execVM "Scripts\bury.sqf"}]; {_x addEventHandler ["killed", {handle = [_this select 0] execVM "Scripts\bury.sqf"}]} forEach (units _vehgrp); _veh addeventhandler ["HandleDamage", {if (((_this select 4) isKindOf "MissileCore") || ((_this select 4) isKindOf "rocketCore")) then { 1; } else { _this select 2; }; }];// Destroy Enemy Air Vehicles With 1 Missle or Rocket _VarHunterName = "airhunterE2"; _veh setVehicleVarName _VarHunterName; _veh Call Compile Format ["%1=_This ; PublicVariable ""%1""",_VarHunterName]; // Initial Waypoint _wp0 = _vehgrp addWaypoint [getPosATL air_pat_east, 200]; _wp0 setWaypointType "MOVE"; _wp0 setWaypointBehaviour "AWARE"; _wp0 setWaypointCombatMode "green"; _wp0 setWaypointStatements ["true", ""]; if (!isNull random_w_player2) then { // Hunt Player nul = [airhunterE2,3100,random_w_player2] call find_west_target_fnc; } else { // Guard Towns nul = [airhunterE2] call east_AO_guard_cycle_wp; }; waitUntil {sleep 1; (!alive _veh) || ((count crew _veh) < 1) || (!canmove _veh)};//count crew _veh == 0 if (((count crew _veh) < 1) && (alive _veh)) then {_veh setDamage 1}; { if (alive _x) then {_x setDamage 1; sleep 0.1} } forEach (crew _veh); if (!alive _veh) then { { if (alive _x) then {_x setDamage 1; sleep 0.1} } forEach (units _vehgrp); }; if (alive _veh) then { _veh setDamage 1; { if (alive _x) then {_x setDamage 1; sleep 0.1} } forEach (units _vehgrp); }; }; sleep (random 600); }; }; sleep (random 600); // Stock A3 Jets _aire3 = [] spawn { airhunterE3 = ObjNull; random_w_player3 = ObjNull; "airhunterE3" addPublicVariableEventHandler {call compile format ["%1",_this select 1]}; "random_w_player3" addPublicVariableEventHandler {call compile format ["%1",_this select 1]}; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { if ((isNull airhunterE3) || (not(alive airhunterE3))) then { private ["_speed","_SAdir","_randomAltitudes","_maxalt","_height","_randomTypes","_maxtype","_type","_vehicle","_veh","_vehgrp","_vel","_VarHunterName","_wp0","_spwnairdir","_poscreate"]; sleep AirRespawnDelay; //call AirEast_move_logic_fnc; if (PatroleWPmode > 0) then { random_w_player3 = ObjNull; publicVariable "random_w_player3"; sleep 3; call find_me3_fnc; sleep 3; //diag_log text format ["AirhunterE3 West Human Target3: %1", random_w_player3]; }; _poscreate = getMarkerPos "spawnaire"; _speed = 180;// starting speed _SAdir = getDir air_pat_east;// Velocity Direction _spwnairdir = [getPosATL air_pat_east, getPosATL air_pat_pos] call BIS_fnc_dirTo;// Spawn Direction _randomAltitudes = [275,375,475,575];// random altitudes _maxalt = (count _randomAltitudes)-1;// count random altitudes _height = _randomAltitudes select (round random _maxalt);// select random altitude _randomTypes = ["I_Plane_Fighter_03_AA_F","I_Plane_Fighter_03_CAS_F","O_Plane_CAS_02_F"]; _maxtype = (count _randomTypes)-1;// count random types _type = _randomTypes select (round random _maxtype);// select random type _vehicle = [getPosATL air_pat_east, _SAdir, _type, EAST] call bis_fnc_spawnvehicle; sleep jig_tvt_globalsleep; _veh = _vehicle select 0; _vel = velocity _veh; _veh setpos [(_poscreate select 0) + (sin (_spwnairdir -180)), (_poscreate select 1) + (cos (_spwnairdir -180)), _height]; _veh setVelocity [(_vel select 0)+(sin _SAdir*_speed),(_vel select 1)+ (cos _SAdir*_speed),(_vel select 2)]; _vehgrp = _vehicle select 2 ;// group of vehicle if (BTC_p_skill == 1) then {[_vehgrp] call BTC_AI_init;}; _veh addEventHandler ["killed", {handle = [_this select 0] execVM "Scripts\bury.sqf"}]; {_x addEventHandler ["killed", {handle = [_this select 0] execVM "Scripts\bury.sqf"}]} forEach (units _vehgrp); _VarHunterName = "airhunterE3"; _veh setVehicleVarName _VarHunterName; _veh Call Compile Format ["%1=_This ; PublicVariable ""%1""",_VarHunterName]; // Initial Waypoint _wp0 = _vehgrp addWaypoint [getPosATL air_pat_east, 200]; _wp0 setWaypointType "MOVE"; _wp0 setWaypointBehaviour "AWARE"; _wp0 setWaypointCombatMode "green"; _wp0 setWaypointStatements ["true", ""]; if (!isNull random_w_player3) then { // Hunt Player nul = [airhunterE3,3000,random_w_player3] call find_west_target_fnc; } else { // Guard Towns nul = [airhunterE3] call east_AO_guard_cycle_wp; }; waitUntil {sleep 1; (!alive _veh) || ((count crew _veh) < 1) || (!canmove _veh)}; if (((count crew _veh) < 1) && (alive _veh)) then {_veh setDamage 1}; { if (alive _x) then {_x setDamage 1; sleep 0.1} } forEach (crew _veh); if (!alive _veh) then { { if (alive _x) then {_x setDamage 1; sleep 0.1} } forEach (units _vehgrp); }; if (alive _veh) then { _veh setDamage 1; { if (alive _x) then {_x setDamage 1; sleep 0.1} } forEach (units _vehgrp); }; }; sleep (random 600); }; }; /* _randomTypes = ["I_Plane_Fighter_03_AA_F","I_Plane_Fighter_03_CAS_F","O_Plane_CAS_02_F"];// stock A3 jets _randomTypes = ["M2000C_CAS_GBU","M2000C","M2000C_CAP"];// A3 HAFM Mod _randomTypes = ["JS_JC_SU35","IVORY_MIG29K_1"];// Modded John Spartan and Saul / Ivory Aircraft _randomTypes = ["I44_Plane_G_Bf109E4_WL","I44_Plane_G_Bf109F2_WL","I44_Plane_G_Bf109G6_WL"]; // A2 I44 mod _randomTypes = ["O_Heli_Attack_02_F","O_Heli_Attack_02_black_F","I_Heli_light_03_F","I_Heli_light_03_unarmed_F"]; //stock A3 choppers */
  21. Yes I am trying to delete entire crew minus pilot and make those crew slots available to players that are picked up, particularly gunners positions. A squad leader can call in evac. Evac lands and waits for callers squad to board chopper and then moves to drop zone. When caller enters chopper the pilot joins callers group. When chopper lands it waits for callers group to disembark. The original crew then unassignVehicle, ejects and rejoins original group and flies away. Several global variables defined in a script called extraction_init.sqf. One optional variable is to remove gunners. The most ideal would be remove all crew minus pilot and copilot in order to not let players take control of chopper from copilot seat.
  22. Well, I do'nt see why you need to pass player when addaction already passes this: _target = _this select 0; // Object that had the Action (also _target in the addAction command) _caller = _this select 1; // Unit that used the Action (also _this in the addAction command) _action = _this select 2; // ID of the Action You can still use player in your script without having to pass it. That would give you the same result as passing it. Addaction is local to the player. _caller {do stuff}; is like player {do stuff}; within your script..
  23. First Congrats on the release and fine work with this mod. I and the guys I play with enjoy it very much. This is scripting related, but it is specifically about working with your mod. I have been working on an Extraction script suite that may see a public release soon and I'm trying to support your choppers I'm not having any luck getting this to work well with AI Here are my findings. with type "kyo_MH47E_base" if i use bis_fnc_spawnvehicle I can delete all crew but driver with this [EvacChopper turretUnit [ 0 ]] join grpNull;// most all seem to use [ 0 ] as copilot deleteVehicle (EvacChopper turretUnit [ 0 ]); [EvacChopper turretUnit [ 1 ]] join grpNull; deleteVehicle (EvacChopper turretUnit [ 1 ]); [EvacChopper turretUnit [ 2 ]] join grpNull; deleteVehicle (EvacChopper turretUnit [ 2 ]); [EvacChopper turretUnit [ 3 ]] join grpNull; deleteVehicle (EvacChopper turretUnit [ 3 ]); [EvacChopper turretUnit [ 4 ]] join grpNull; deleteVehicle (EvacChopper turretUnit [ 4 ]); This works fine. Now when pilot dissembarks he gets stuck in back of chopper. with type "kyo_MH47E_HC" [EvacChopper turretUnit [ 0 ]] join grpNull; deleteVehicle (EvacChopper turretUnit [ 0 ]); [EvacChopper turretUnit [ 1 ]] join grpNull; deleteVehicle (EvacChopper turretUnit [ 1 ]); [EvacChopper turretUnit [ 2 ]] join grpNull; deleteVehicle (EvacChopper turretUnit [ 2 ]); [EvacChopper turretUnit [ 3 ]] join grpNull; deleteVehicle (EvacChopper turretUnit [ 3 ]); [EvacChopper turretUnit [ 4 ]] join grpNull; deleteVehicle (EvacChopper turretUnit [ 4 ]); bis_fnc_spawnvehicle in combination with above does nothing, but the pilot can disembark and get back in with no problems type "kyo_MH47E_Ramp" yields the same results as type "kyo_MH47E_HC" Am I missing something or maybe this not especially designed to support AI the way A3 choppers do. If could get just one type working with this It would be great. Yes there are other methods for spawning vehicle and filling them with crew, but so far this has been working well A3 and other moded choppers Any feedback is appreciated. Thank You.
  24. player init this addAction ["<t color=""#FFAD1F"" size='1.5' shadow='2'>" +"PUSH","script.sqf"]; script.sqf detach obj; obj setVelocity [10,0,0];
×