Havoc302 Posted December 30, 2014 Report Share Posted December 30, 2014 Has anyone worked out how to call drones on a specific location? I'd like to be able to call drones at server start up to hover around certain locations and call in their AI if they spot someone. I'm not so worried if they respawn or not, just so long as I can get them to come in at restart. Looking through the Epoch code for looting I found [_target,_triggerType]call EPOCH_server_triggerEvent; in the EPOCH_server_destroyTrash.sqf file, just no idea how to specify a drone and where to place it. Link to comment Share on other sites More sharing options...
Face Posted December 30, 2014 Report Share Posted December 30, 2014 The spawning and positioning of the UAVs is handled by @Epoch\Addons\a3_epoch_code\compile\EPOCH_unitSpawn.sqf. The position is generated using BIS_fnc_findSafePos. Link to comment Share on other sites More sharing options...
Phobix_ Posted December 30, 2014 Report Share Posted December 30, 2014 or just use infistar Link to comment Share on other sites More sharing options...
Havoc302 Posted December 30, 2014 Author Report Share Posted December 30, 2014 or just use infistar That works if you're there clicking them, how would you automate that to do it at server startup? Thanks Face, I'll take a look at that. Link to comment Share on other sites More sharing options...
Brunz Posted December 31, 2014 Report Share Posted December 31, 2014 I wrote a server side script to spawn drones on players using the epoch function, there are some restrictions however it will only spawn a drone if there is no other drone within 200 metres of the target.the bonus is that drones generally spawn 240 metres away so if you are quick you can spawn a few before any are in range :) I was going to make it into a mission of some kind but abandoned it. Ps it works for sappers, drones, cloaks and sharks. happydayz 1 Link to comment Share on other sites More sharing options...
Havoc302 Posted December 31, 2014 Author Report Share Posted December 31, 2014 I wrote a server side script to spawn drones on players using the epoch function, there are some restrictions however it will only spawn a drone if there is no other drone within 200 metres of the target.the bonus is that drones generally spawn 240 metres away so if you are quick you can spawn a few before any are in range :) I was going to make it into a mission of some kind but abandoned it. Ps it works for sappers, drones, cloaks and sharks. That'd be great if you're willing to share, I want to put some static drones over certain military areas and some static AI, the AI I have sorted already, the drones were proving more of a problem. Link to comment Share on other sites More sharing options...
Brunz Posted December 31, 2014 Report Share Posted December 31, 2014 i will share when i am home, i don't think it will work for static area as from memory the function takes a player as a parameter not a position and also despawns when there are no players in certain range, i was trying to get it to work with a mission trigger but im a beginner at scripting so was only able to get the trigger to detect players and hint, though the serer side loop through playable units was working. Link to comment Share on other sites More sharing options...
Havoc302 Posted December 31, 2014 Author Report Share Posted December 31, 2014 i will share when i am home, i don't think it will work for static area as from memory the function takes a player as a parameter not a position and also despawns when there are no players in certain range, i was trying to get it to work with a mission trigger but im a beginner at scripting so was only able to get the trigger to detect players and hint, though the serer side loop through playable units was working. Awesome thanks man, I'll see what I can work out from there. I'm only really a beginner at this stuff too, trying to fumble my way through. Link to comment Share on other sites More sharing options...
happydayz Posted December 31, 2014 Report Share Posted December 31, 2014 It would spawn ai that can't hurt you though right if no player? Though they could just attach to nearest player as they wouldn't be cleaned up anymore... Link to comment Share on other sites More sharing options...
Brunz Posted December 31, 2014 Report Share Posted December 31, 2014 The code is below, i don't believe its working in its current state but you will get the gist of what i was trying to do and the calls below to the epoch functions will work. It spawns the ai just as though it were spawned naturally. //Custom Server PBO waitUntil {time > 0}; //Create Trigger MissionTrig = createTrigger ["EmptyDetector", _objective]; sleep 0.5; publicVariable "MissionTrig"; CreateAI = false; publicVariable "CreateAI"; while {true} do { while {TriggerActivated MissionTrig} do { { if (isPlayer _x && Alive _x) then { _LoopPlayer = getPosATL _x; diag_log format['CustomPBO %1 - Spawning Mobs on Player POS = %2',time,_LoopPlayer ]; [{hint "Mission: Enemies have entered the area...";},"BIS_fnc_spawn",true,true] spawn BIS_fnc_MP; [['unitSpawn','I_UAV_01_F'],(owner _x)]call EPOCH_sendPublicVariableClient; [['unitSpawn','I_UAV_01_F'],(owner _x)]call EPOCH_sendPublicVariableClient; [['unitSpawn','I_UAV_01_F'],(owner _x)]call EPOCH_sendPublicVariableClient; [['unitSpawn','Epoch_Sapper_F'],(owner _x)]call EPOCH_sendPublicVariableClient; [['unitSpawn','Epoch_Cloak_F'],(owner _x)]call EPOCH_sendPublicVariableClient; }; } forEach PlayableUnits; }; if (TriggerActivated MissionTrig) then {diag_log format['CustomPBO %1 - Trigger Activated',time ]; }; sleep 10; }; //Mission Code //setup trigger on every client if (!isDedicated) then { waitUntil {!isNil "MissionTrig"}; waitUntil {time > 0}; MissionTrig setTriggerArea [100,100,0,false]; MissionTrig setTriggerActivation ["ANY", "PRESENT", true]; MissionTrig setTriggerStatements [ "this", "CreateAI = true;hint 'WARNING: You have Entered the Mission Zone!'", "CreateAI = false;hint 'You have Fled the Mission Zone!'" ]; PublicVariable "MissionTrig"; }; //Debug while {true} do { sleep 10; hint str [ //triggerArea MissionTrig, triggerActivation MissionTrig, //triggerStatements MissionTrig, triggerActivated MissionTrig, list MissionTrig, CreateAI ]; }; Link to comment Share on other sites More sharing options...
Moody Posted January 31, 2015 Report Share Posted January 31, 2015 The spawning and positioning of the UAVs is handled by @Epoch\Addons\a3_epoch_code\compile\EPOCH_unitSpawn.sqf. The position is generated using BIS_fnc_findSafePos. Where in that EPOCH_unitSpawn.sqf file do i change so UAVs spawn faster and more often? On my server its almost never any drones spawning in towns. Making it kinda dead in towns =( Link to comment Share on other sites More sharing options...
Fog Horn Posted January 31, 2015 Report Share Posted January 31, 2015 Where in that EPOCH_unitSpawn.sqf file do i change so UAVs spawn faster and more often? On my server its almost never any drones spawning in towns. Making it kinda dead in towns =( // Antagonists antagonistChanceTrash = 0.08; antagonistChancePDeath = 0.35; antagonistChanceLoot = 0.08; change as required Link to comment Share on other sites More sharing options...
Moody Posted January 31, 2015 Report Share Posted January 31, 2015 // Antagonists antagonistChanceTrash = 0.08; antagonistChancePDeath = 0.35; antagonistChanceLoot = 0.08; change as required Those commands are not in the EPOCH_unitSpawn.sqf file? Im quite sure i have seen those lines somewhere else? am i right? Link to comment Share on other sites More sharing options...
Fog Horn Posted January 31, 2015 Report Share Posted January 31, 2015 epochconfig.hpp Link to comment Share on other sites More sharing options...
Moody Posted January 31, 2015 Report Share Posted January 31, 2015 epochconfig.hpp You wouldnt know what these variables counts as? Like it is now, 0,08. How long/much is that and what would be a fairly correct number to set it to? Link to comment Share on other sites More sharing options...
Sp4rkY Posted January 31, 2015 Report Share Posted January 31, 2015 0,08 ~ 8% Moody 1 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