Jump to content

Tankbuster

Member
  • Content Count

    8215
  • Joined

  • Last visited

  • Medals

Everything posted by Tankbuster

  1. My homebrewed tactical ping has its limitations - as it's global there's only one allowed on the map at a time, but I gave up with the game's system because I found it unreliable. Anyway, where it would work best is on the artillery computer map but it doesnt show there. A decade old post came back from search, but I don't really understand displays and controls and the donated code didn't work, so I'm here again, asking for help 🙂 The ping shows on the map and UI just fine. Here's my code; _ctr1 and _atpmapip1 are the new, non working code. There's no error, apart from the _ctrl undefined from the last line of code which shows the _ctrl1 line is exitwith 'ing. /* Code written by Tankbuster */ #include "..\..\..\includes.sqf" __tky_starts scriptName "fn_showauthtacping"; private ["_atpmapip","_atpuiid"]; private _st = serverTime; private _ctrl = findDisplay 12 displayCtrl 51; _ctrl1 = ({ if !(isNull (_x displayCtrl 502)) exitWith {_x}; displayNull } forEach allDisplays) displayCtrl 500; if (((goggles player in ["G_Goggles_VR", "G_Combat_Goggles_tna_F", "G_Combat", "G_Balaclava_TI_G_tna_F","G_Balaclava_TI_G_blk_F","G_Tactical_Clear", "G_Tactical_Black"]) or shownArtilleryComputer) and ((lifeState player) in ["HEALTHY", "INJURED"])) then {// player has received a ping, has the required gear and is alive // draw ping icon on map _atpmapip = _ctrl ctrlAddEventHandler ["Draw", { _this select 0 drawIcon [ "\a3\Ui_f\data\IGUI\Cfg\TacticalPing\TacticalPingDefault_ca", // Custom images can also be used: getMissionPath "\myFolder\myIcon.paa" [0.73,0.24,0.11,1], authtacping, 64, 64, 0, "Ping", 2, 0.03, "TahomaB", "center" ]; }]; _atpmapip1 = _ctrl1 ctrlAddEventHandler ["Draw", { _this select 0 drawIcon [ "\a3\Ui_f\data\IGUI\Cfg\TacticalPing\TacticalPingDefault_ca", // Custom images can also be used: getMissionPath "\myFolder\myIcon.paa" [0.73,0.24,0.11,1], authtacping, 64, 64, 0, "Ping", 2, 0.03, "TahomaB", "center" ]; }]; // draw ping icon on game ui _atpuiid = addMissionEventHandler ["draw3D", { drawIcon3D [ "\a3\Ui_f\data\IGUI\Cfg\TacticalPing\TacticalPingDefault_ca", [0.73,0.24,0.11,1], authtacping, 1.5, 1.5, 0, "Ping", true, 0.03, "TahomaB", "center", true, 0, -0.06 ]; }]; playsound ["TacticalPing4",false]; sleep 30; removeMissionEventHandler ["draw3D", _atpuiid]; _ctrl ctrlRemoveEventHandler ["Draw", _atpmapip]; _ctr11 ctrlRemoveEventHandler ["Draw", _atpmapip1]; };
  2. authtacping is a screenToWorld position that is publicvariabled by the client sending the ping.
  3. Tankbuster

    points for healing in MP

    Thank you. Well done!
  4. All, Although I'm mostly retired as a mission maker, my players saw that HandleHeal is said to be fixed, so I knocked up this code. But I'm getting nothing, no hints, nothing. The EH is being added, I'm sure of that I have a script called eventhandlers.sqf that takes care of this and all the other EHs added there work. Help gratefully accepted player addEventHandler ["HandleHeal", { [] spawn { hint "handleheal active 1"; params ["_injured", "_healer", "_isMedic", "_atVehicle", "_action"]; private _damage = damage _injured; hint "handleheal active 2"; if (_injured isNotEqualTo _healer) then { waitUntil { (damage _injured isEqualTo 0) or (damage _injured isEqualTo 1) }; hint "waituntil released"; if (damage _injured isEqualTo 0) then {// give healer points [_healer,1] remoteExec ["addScore",2]; hint "giving points"; }; }; }; }];
  5. Tankbuster

    Authority 20 player coop.

    Build 1.28.5212 New secondary mission added plus a few fixes. 5204 Fix error breaking points-for-revivers system 5205 Better cleanup of enemy assets after boat patrol mission 5206 New SM, aircrash search 5209 Tweaked and removed deprecated code and variables from recoverdeaddrop SM 5210 Fixed missing SMs from mission manager 5212 Build and publish
  6. Authority. The mission A coop mission on Altis, Tanoa or Prairie Fire's Vietnam. The CSAT forces hold the island and a small BLUFOR force are going to take them back BLUFOR will be landed on a beach with an ammo box and 4 ATVs. You'll have a Forward Point vehicle that you can spawn at. It will have a small selection of magazines in its inventory. Artillery and cruise missile support is provided by an offshore destroyer The Forward vehicle will be replaced if it's destroyed. It's a Prowler, the 50cal one. For RHS versions it is an Oshkosh MRAP Your first task is to secure a nearby airfield to use as an airhead. Clear all the enemy assets and forces out. There will be a radar system to destroy, that will stop the enemy from bringing in airborne reinforcements and there will also be an HQ vehicle. Destroying that will mean the enemy has no more air support. Once the airfield is taken, you will be given a small base area with vehicle and aircraft servicing and a respawn point. The arsenal box from the beach will be moved here too. Players can spawn a quad here too. Also, another vehicle - A Hunter MRAP (RHS an FMTV) - will be delivered to the base. This is the FOB vehicle. This can be deployed and unpacked into a small FOB. You can respawn at the fob, plus it also has an arsenal box. If the engine is off, the player in the back seat can deploy and undeploy the FOB. This seat also has access to the artillery. After the airfield, you'll be given orders to assault another nearby target. If it's a town, it will have some roadblocks at the city limits. Destroy them to stop enemy road reinforcements. Small towns will be mostly infantry, bigger targets will be better defended. Each successful target taken wins you another vehicle. Aircraft that are won are delivered to the helipad at your airhead in the form of a crate. An engineer must 'unbox' them. Players can specify the drop position of non-aircraft prizes (and respawning FOB/ Forward vehicles). If the primary target is a civilian town, once you've cleared out the enemy, you will have to complete other, secondary tasks, often rebuild or reparation type assignments. How many you have to do will depend on how the assault phase went. Killing civilians, damaging their buildings and such like will all mean more secondaries to complete. The mission runs BI revive. Anyone can revive although the medic is much quicker. The mission has a dialog screen that gives useful information. Press (default) Left windows key or select it from the map screen menu. Under the bonnet When the mission starts, it chooses one of the airfields (though not the salt flats or the main airbase on Altis). The mission then chooses a nearby beach for the beachhead position. Subsequent towns are chosen so that they are close by - it will never choose a distant town when there are closer alternatives. It will also always choose a target on the same island until there's no choice but to island-hop. When this happens, players are airdropped a Blackfish vehicle transport to allow them to move, at least, the forward vehicle and the FOB vehicle. No addons required, though I like to use Advanced Urban Rappelling, Enhanced Movement, Simple Map Tools and Password Manager Note for mission admins and server operators This mission is designed to run on dedicated servers with persistent battlefield. File patching should be allowed on the server and clients This mission should provide 20+ hours of dynamic gameplay. Leave difficulty settings at default and select custom difficulty. You don't need a Zeus. All of what a Zeus does is done automatically in code by the mission. In fact, if you do use a Zeus, you will break some things. The mission is best played with all available BI DLCs. Only the Prairie Fire DLC is supported. That version uses the CamLaoNam map and some of its assets. ACE is not supported and the mission doesn't need CBA. Downloads http://steamcommunity.com/sharedfiles/filedetails/?id=758581029 https://steamcommunity.com/sharedfiles/filedetails/?id=1577912956 Public download links. Authority Altis https://drive.google.com/file/d/1QCSRUUnjMm0ANe8Bwy18ijiB_IURxq-I/view?usp=sharing Authority Tanoa https://drive.google.com/file/d/1xG6CvKg3Ns0i3JvqF2mlJktdwvAPynAa/view?usp=sharing Authority Cam Lao Nam (CTRG vs CSAT) https://drive.google.com/file/d/1a4B3lPtzb2P1VavSUFFriEeDUWDAdE45/view?usp=sharing Authority Altis RHS https://drive.google.com/file/d/1plaaDf_wLVM3EOYH-wOz2GKjCS93Bp-C/view?usp=sharing Authority Tanoa RHS https://drive.google.com/file/d/1oYjRvV76fnraMmt5Qq_ytTsDuHMpupcf/view?usp=sharing CBA users, the mission doesn't use or require CBA, but if you do, read this post about the CHVD View Distance manager.
  7. Tankbuster

    Authority 20 player coop.

    Build 1.28.5202 A few nice features added today: The ability to drag a darter drone backpack from an inventory (like a vehicle) to the ground and assemble the darter right there. No messing with putting the backpack on your back. Also, points awarded for reviving other players. Medics get 2 points, everyone else gets 1. 5194 Statics removed before runway wreck clear SM runs 5195 Added ability to drop a drone backpack on ground from a vehicle inventory then assemble drone from it 5196 Fixed debug_endprimary destroying unarmed enemy vecs 5197 setcombatbehaviour on vls and arty gunners to try to stop them firing autonomously, particularly on airbase 5198 Improved checking of dead lift choppers when choosing prizes 5201 Added tky, serverside system for giving points to revivers 5202 Build
  8. Tankbuster

    points for healing in MP

    Both scripts launched from initserver.sqf incapacitatedplayers variable set to [] in initserver ../includes.sqf does macros and other stuff, remove it and the __tky lines if using this code // by tankbuster #include "..\includes.sqf" _myscript = "rewardreviversmanager.sqf"; __tky_starts while {true} do { sleep 4; { if (((lifestate _x) isEqualTo "INCAPACITATED") and (not (_x in incapacitatedplayers))) then { incapacitatedplayers pushBackUnique _x; [_x] execVm "server\rewardrevivers.sqf"; }; }foreach allPlayers - (entities "HeadlessClient_F"); }; __tky_ends // by tankbuster #include "..\includes.sqf" _myscript = "rewardrevivers.sqf"; __tky_starts params ["_inj"]; diag_log format ["###rr gets %1", _inj]; waitUntil {(lifeState _inj)isNotEqualTo "INCAPACITATED"}; incapacitatedplayers = incapacitatedplayers - [_inj]; sleep 0.5; if ((lifeState _inj) isEqualTo "HEALTHY") then// player is no longer incapacitated {// check if player have been revived private _nearpotentialhealers = (_inj nearEntities ["SoldierWB", 3]) select {"medicend" in (animationState _x)}; if (_nearpotentialhealers isEqualTo []) exitwith { diag_log format ["### RR thinks no-one healing nearby and quits"]; }; private _nearestpotentialhealers = [_nearpotentialhealers, [], {_inj distanceSqr _x}, "ASCEND"] call BIS_fnc_sortBy; private _actualhealer = _nearestpotentialhealers #0; _actualhealer addScore 1; if (_actualhealer getUnitTrait "MEDIC") then { _actualhealer addscore 1; }; diag_log format ["### revived!! npf %1, npf2 %2, ah %3 , score %4", _nearpotentialhealers, _nearestpotentialhealers,_actualhealer, getPlayerScores _actualhealer ]; } else { diag_log format ["### RR thinks player wasn't revived and quits"]; }; __tky_ends
  9. Tankbuster

    points for healing in MP

    It's all very odd and rather than mess with code and locality that I don't really understand despite your best efforts, for which I'm extremely grateful, I've spent the afternoon writing and testing a server side, jipsafe, respawnsafe system for awarding points to players who revive incapacitated players using lifeState and animationState. I'm testing, trying to break and improve it now.
  10. Tankbuster

    points for healing in MP

    I can't make it work reliably. Your code has worked a couple of times, then at other times, under seemingly identical circumstances, it doesn't. 😞
  11. Tankbuster

    points for healing in MP

    Thank you for doing this. Much appreciated. I know the waitUntil is a potential problem. Partial heals, healer getting killed during revive, different healers to name just a few. My plan was to get the EH and remoteexec parts working and assured before adding security and otther features. Medic gets more points for a revive, for example. I think I know what you mean, although the execution is local, every instance of each player needs to have the EH, so client 1 must have the EH and code on their entity locally and remotely. It's this bit of locality I rarely, if ever grasp. 🙂 I don't have to remove the EH from disconnects - AI don't take control, but it is something to note. Also, it's not clear, as you point out, if this EH is respawn persistent. Only one way to find out 🙂 I've actually got an animation based system in mind to do the points-for-revive thing, rather than Handleheal. Let's see how this goers first though. I'll try your code now and report back. Again, many thanks.
  12. Tankbuster

    points for healing in MP

    Right, I'm getting the active 2 hint when I heal myself, so the EH is working, sort of
  13. Tankbuster

    points for healing in MP

    Thanks for that - I've tried that before and it didn't work, but I tried it again just now to be absolutely sure and it still doesn't work. Not even getting the hints. I don't think locality is the issue. The eventhandler is added in a file called eventhandlers.sqf which runs on all clients. The other EHs added here work OK.
  14. Hello all, In my mission, I have the VLS and MK45 on the destroyer offshore and I use the game artillery system on the MK45 and some scripting using reportRemoteTarget and fireAtTarget on the VLS so players can call in fire support. It works quite well and players like it. But just occasionally, the destroyer spawns too close to the enemy and both systems start firing autonomously, often doing far too much collateral damage. So I want to have these gunners only fire when I tell them to. I could move the destroyer further offshore, but it's really cool to see it there on the horizon and watching Venators launch in the distance and fly in is a lot of fun. The gunners; their combatMode is yellow by default, so I set it to blue or white. The VLS works, but the MK45 raises its gun but never fires. Anyway, combatMode changes from what I set it to. An enemy aircraft flew near the ship and they both went to red, despite not being able to engage the aircraft. CombatMode isn't the solution then. combatBehaviour is said to be able to change combatMode. By default both gunners are in AWARE, and I'm fiddling with that now, though the descriptions of the combat behaviours doesn't seem to fit with gunner roles. I'll keep trying. I also have tried setskill spotdistance zero, and that does seem to work. So far, the gunners have not started engaging targets on their own, but that might just be luck and the randomness of the mission. While I'm pounding commands into the mission, any help would be much appreciated. Tankbuster -Paul-
  15. Tankbuster

    AAF Virtual Navy Mod

    Get well soon, fella
  16. makeuavfromdroppedbackpack = player addAction ["Assemble AR-2 Darter", "_dp = getpos cursorObject; deleteVehicle cursorObject; _d = createVehicle ['B_UAV_01_F', _dp,[],0,'CAN_COLLIDE']; createvehiclecrew _d;",nil,0,true,true,"","backpackCargo cursorObject isEqualto ['B_UAV_01_backpack_F']",10,false]; Thank you guys! good work!
  17. Hello all! My players tell me it's annoying to be required to have the UAV backpack on their back in order to create the UAV. They want to, for example, get a UAV backpack direct from a vehicle inventory, throw it on the ground (this they can do) and then create the UAV from the grounded backpack. I'd like to give them the action to 'Assemble [drone]' while looking at it on the ground. But backpacks on the ground are always dummyweapon.p3d or typeof them is GroundWeaponHolder. How can I check if they are looking at a UAV backpack? Thanks, Tanky -Paul-
  18. Oh yes, very helpful! Thank you.
  19. Oh, the holder is a container? Oh! yes! backpackCargo returns the UAV backpack! Thank you. I'm mostly retired from editing these days - my skills are a little dulled by time 🙂
  20. Tankbuster

    Authority 20 player coop.

    Another update to fix a bug that was breaking a few bits like the vehicle service system 5192 Fix for polluted allbluvehiclesarray breaking thigns like movebase, gvs and datasave
  21. Tankbuster

    Authority 20 player coop.

    I should make it optional really. When I tried RF cDLC, I liked it so much, I put it into the mission without thought for players who don't have it.
  22. Tankbuster

    Authority 20 player coop.

    RF Weapons is the Reaction Forces cDLC. The mission needs that.
  23. Guys, can anyone help? During mission start, I use this to find all the big buildings on each map. bighouses = (nearestTerrainObjects [[worldSize/2, worldSize/2], ["house", "tourism", "building", "hospital"], worldSize/sqrt 2, false, true]) select { ((count (_x buildingPos -1)) > 11) and (((str _x) find "pier_f") isEqualTo -1) and (((str _x) find "BIS_N") isEqualTo -1) and (((str _x) find "cargo") isEqualTo -1) and (((str _x) find "small") isEqualTo -1) and (((str _x) find "shop") isEqualTo -1) and (((str _x) find "hangar") isEqualTo -1) and (((str _x) find "scf") isEqualTo -1) and (((str _x) find "warehouse_02") isEqualTo -1) and (((str _x) find "warehouse_01") isEqualTo -1) and (((str _x) find "drydock") isEqualTo -1) and (((str _x) find "storagetank") isEqualTo -1) and (((str _x) find "addon") isEqualTo -1) and (((str _x) find "slum") isEqualTo -1) and (((str _x) find "crane") isEqualTo -1) and (((str _x) find "containerline") isEqualTo -1) and (((str _x) find "sy_01") isEqualTo -1) and (((str _x) find "multistorybuilding") isEqualTo -1) and (((str _x) find "hut_") isEqualTo -1) and (((str _x) find "ruins") isEqualTo -1) and ((_x call BIS_fnc_objectHeight) > 5.6) };// used when we need a large house with lots of positions, barricade defend etc. included barracks Problem is, it doesn't find the embassy on Cam_Lao_Nam. The object is a building as far as nearestTerrainObjects is concerned, and is within the radius of the position suppliled- - I've checked that. nearestterrainobjects pos is [10240,10240] and the radius is 14481. The embassy is actually 9100m away, so it's well within range It fits the other criteria in the code too, it's 33m high and has 55 buildingpos in it. The bighouses array is populated. On CLN it has 523 objects in it, but not the embassy in Saigon. Am I just killing the VM with the huge radius?
  24. Tankbuster

    change Ownership of vehicle with crew?

    Really? I've never seen any issues on my dedicated server.
  25. That's a lot of addons! And a lot of errors with them.
×