-
Content Count
8191 -
Joined
-
Last visited
-
Medals
Posts posted by Tankbuster
-
-
@sarogahtyp I have plugged handledamage into the existing code and it sort of works. The only issue is that it returns the classname of the projectile, not its object, so the multiple activation prevention code is compromised
-
6 hours ago, dreadedentity said:each client adds it's own event handler to the unit;
Really? That's unnecessarily complex. I mean, I know how to do it, but really?
-
24 minutes ago, _foley said:The HitPart event is more complicated than that in terms of locality. This event will fire only on the machine of the shooter, no matter if the target is local or not.
You should add it on every machine that can potentially shoot the unit as opposed to just on the server where the unit is local.
This isn't a problem for SP or hosted MP but it will make you scratch your head when you run it on dedicated server 🙂
Ah right. Yes, I see. Well, that might work in my favour as this is best run client side.
-
It is for MP. I did read the wiki notes on locality.
The units that are being hit are server local and I want the code to run there.
I've only tested localhost so far so will look out for issues.
-
Yes, thank you, guys! It's working 🙂
Tested full auto and it handles that just fine as you said it would. I added an alive clause because it's possible to shoot deads to increase your fired/hit ratio and I know players who would do that lol
_x addEventHandler ["HitPart", { (_this#0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"]; _handledShot = _target getVariable ["LastProjectile", objNull]; if (_projectile != _handledShot and {alive _target}) then { _target setVariable ["LastProjectile", _projectile]; if (_isDirect) then { diag_log format ["%1 hit %2 in the %3", name _shooter, name _target, _selection#0]; }; }; }];
I'll store this info in an array on the server, one record per player. I already have a firedMan EH on players so I can count their shots. When players open the scoretable (that's when I display the KDR and FHR) the client will get the array from the server and work out the FHR and display it.
Once again, thank you, everyone.
- 1
-
9 minutes ago, Harzach said:It won't filter the multi-hits, though.
That's right, it doesn't. Single shot;
19:37:44 "&&& Tankbuster hit Arif Nazari in the leftarmroll, with a 1781187: tracer_red.p3d direct? true " 19:37:44 "&&& Tankbuster hit Arif Nazari in the spine3, with a 1781187: tracer_red.p3d direct? true "
But hopefully, I can only count the first hit with any given projectile
-
3 minutes ago, Harzach said:You can filter out splash damage if so desired:
this addEventHandler ["HitPart", { (_this#0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"]; if (_isDirect) then { systemChat format ["%1 hit %2 in the %3", name _shooter, name _target, _selection#0]; }; }];
Oh! The isdirect! I didn't think of that. Testing it now.
-
3 hours ago, dreadedentity said:I think this is ok because he wanted to measure hits vs misses, not kills. Although he did mention kills/deaths ratio early in the thread which could add some confusion
Yeah, KD ratio is easy, that can be done from the scoreboard. I'm trying to get fired/hit ratio
-
4 hours ago, dreadedentity said:It might work to save the bullet object and check against it in further events, no other bullet should ever equal the one that was just fired
_handledShot = _target getVariable ["LastProjectile", objNull]; if (_projectile != _handledShot) then { _target setVariable ["LastProjectile", _projectile]; //increment hit counter };
Yes, right. I see. Will this handle a unit getting hit by a burst of full auto?
-
I'm getting occasional duplicate activations of the EH when shooting single shot. 😞 That's going to make this extra tricky. Can't have hits > shots.
12:34:56 "&&& Tankbuster hit Rahim Amin in the spine1 " 12:35:19 "&&& Tankbuster hit Jamal Kakar in the leftleg " 12:35:30 "&&& Tankbuster hit Khairullah Kakar in the leftleg " 12:35:42 "&&& Tankbuster hit Akbar Bahadur in the leftlegroll " 12:35:45 "&&& Tankbuster hit Akbar Bahadur in the spine2 " 12:35:45 "&&& Tankbuster hit Akbar Bahadur in the spine3 " 12:35:51 "&&& Tankbuster hit Khairullah Kakar in the spine2 " 12:35:51 "&&& Tankbuster hit Khairullah Kakar in the spine1 "
-
On 2/28/2022 at 3:54 AM, Harzach said:Use the HitPart EH.
this addEventHandler ["HitPart", { (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"]; hint format ["%1 hit %2 in the %3", name _shooter, name _target, _selection#0]; }];
You can pull all sorts of interesting details from it, just be sure to note the information regarding locality in the Biki entry.
Apologies for the late reply and thanks. 🙂 I've just returned to this and yes, hitpart works for both one shot kills and a wounding. Excellent!
However, I notice that https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Projectile_Event_Handlers is coming with 2.10 where we can add HitPart to a projectile which might really simplify this. I think I might wait for that.*edit.. actually, I'm not sure about waiting now... it's about whether it's best to add the EH to an enemy unit or a projectile. Hmmm
-
Mission updated to 1.22.4920
Fixed some bugs and added a few features:There's a paradrop of enemies as players enter the AO.
Made a few towns/bases that are really too small to support a primary target force into secondary mission only types
Map now shows all friendly vehicles
Spoiler4888 Added a paradrop as players enter the AO
4891 Fixed: Forward not placed at beachhead after a restore
4893 Added LRR ammo to forward vehicle inventory
4894 Improved FOB deploy, ejects any driver, turns engine off and locks driver seat, nearobjects also less strict
4898 Try to fix the duplicated forward vehicle drop by adding a quit if not server. Not at all sure this is the fix
4900 Improved reinforcementchopper by seeing it up and improved it's termination when radar is dead
4901 In disguisedinfil SM, when doing retrieve game, players don't have to get as far as fob or airhead to complete
4902 Improved termination of dirindicator in disguiseinfi missions
4903 Simplified position of dead driver prop in bluconvoy mission
4904 kidnapplayer SM: Improved missionstring handling, improved IED veh slowing
4905 kidnapplayer SM: holdaction moved to smaddactions
4906 kidnapplayer SM: succeeds when rescued player is clear of town
4907 healsubmariner SM: improved sub waiting for player to be safely in helicopter
4908 Fixed ampersand bug in makediary
4909 Agia Triada no longer a PT
4910 Fixed bad syntax of createvehiclelocal placing helipad in reinforcementchoppermanager
4911 GVS radius from 10 to 11. helps with servicing of larger vehicles
4912 Map icons shown on friendly and stolen vehicles
4913 Athira, stavros more and zeloran mil bases now not PT, secondary only
4914 killlastfewai stuck check now checks distance in 3d
4915 Fixed bad position of topolia
4916 Added debug for kill1man and increased radius of its building finder
4918 Raised height that cmartyscore checks for alive vecs
4919 Disabled brakes on vehicles being towed4920 Build and publish
-
Another quality topic from a user whose username was chosen by mashing the keyboard
- 5
- 1
- 1
-
12 hours ago, Tankbuster said:Without any evidence, I'm going to suggest the i3 is going to benefit from ore bandwidth on the motherboard and DDR4 RAM
And, as @Groove_C says, the L3 cache which worth a lot of performance
-
6 hours ago, fn_Quiksilver said:And another small command request:
"nearSimpleObjects"
we already have these:
nearEntities
nearestBuilding
nearestMines
nearestObject
nearestObjects
nearestTerrainObjects
nearObjects
nearObjectsReady
nearRoads
nearSupplies
but no simple way to detect nearby simple objects without iterating through big array of simple objects and checking distance
Even better would be nearestSimpleObjects with a parameter to turn off sorting.
-
Without any evidence, I'm going to suggest the i3 is going to benefit from ore bandwidth on the motherboard and DDR4 RAM
-
I've had a quick look over that RPT. You use a lot of addons and you use some that I'm not familiar with. I don't use CUP or ACE3 for example.
You use CUP Terrains core, but the RPT at line 158 onwards seems to say you're missing some required CUP addons.
Also, clients are executing functions that are not allowed by class CfgRemoteExec. That's causing a lot of RPT spam
- 2
-
1.85 MB? Those are rookie numbers. A large logfile isn't a problem as such, frequent writing to the file can cause issues.
A mission that has been running for a long time (more than a few days) can accumulate a large logfile because there's a lot of stuff that the game writes to the logfile normally.
Because writing the logfile is an I/O operation that is expensive on RAM and CPU, lots of logfile entries being written in a short time is a problem. A script error or some other issue that writes the logfile more than a ~20 times a second can have an impact on performance.- 1
-
OK, let's work this through.
These areas, are they at ground level?
Is the position you want to get nearest to, is that ground level too?
Why the talk of calculatePath? Is it relevant?
Is the distance to be calculated the shortest, direct distance?
-
Why isn't sorting the area centres working?
Is the centre of the area good enough? Are the areas the same size, shape and orientation?
https://community.bistudio.com/wiki/BIS_fnc_nearestPosition
[_arrayofareacentres,_mypostion] call BIS_fnc_nearestPosition
Will do what you want if the centre is good enough
If you need the nearest edge of the area that is nearest to your position, it's doable, but rather more complicated.
- 1
-
The server and client mission files are identical because the client gets them from the server.
-
22 hours ago, EO said:Unless I'm reading your issue wrongly, it was only the remainder of ebo's in the Enoch folder that were converted to pbo's, there are still ebo's in the Contact folder.
Yeah that's probably a side issue. The main issue is that although the server and client versions are identical, the game says they are different.
-
@Dna said in spotrep
QuoteTweaked: Converted AoW (Art of War) and remainder of Enoch (Contact - Platform) addons to PBO
So why is the server looking for EBOs?
-
Since this week's update, I'm unable to join my own server.
In the server browser, it shows a red cross and the tooltip "Different version of Arma 3"
According to the server RPT, the game is Version: 2.08.148892
According to the client RPT, the game is Version: 2.08.148892
If I ignore the red cross and join the server, the join failed and this is in the client RPT
21:28:53 Data required by server could not be found: a3\air_f_contact\
And the server RPT
21:28:53 File 'contact\addons\air_f_contact.ebo' not found.
I've verified the cache on both the server and clients. I get the same issue on 3 different clients/steam accounts.
fired hit ratio for players
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Yep. That was my next port of call.
I note that hitpart works with projectiles as of next game version. I'll look to see if that has any locality boobytraps when it arrives.