Project Zomboid

Project Zomboid

ShowAttackDistance
40 kommentarer
Cowk 1. apr. kl. 20:27 
No problem bro, thanks for updating the mod, very useful
Tchernobill  [ophavsmand] 1. apr. kl. 20:01 
@Cowk Thank you for asking bro. I'd prefer not.
I just uploaded it there .
Still gg for doing it on your side.
Cowk 1. apr. kl. 10:49 
hey
Cowk 30. mar. kl. 16:11 
To tell you the truth, I already updated it, but only for personal use, so I'm here to ask for permission.
Cowk 30. mar. kl. 16:10 
Hey bro, can i update your mod to B42?
Goonter 23. jan. kl. 9:05 
@klaarturo I found that donating to them is a very good motivator. ;-)
Klaarturo 20. dec. 2024 kl. 5:27 
Hopefully this mod will be updated for Build 42. Please, when possible, I would love you to update it :)
我有一个学妹 2. nov. 2023 kl. 23:48 
This is great news for me, a newbie.
Tchernobill  [ophavsmand] 23. aug. 2023 kl. 4:12 
@Romzes Thanx for report
Romzes 23. aug. 2023 kl. 2:17 
Bug. The button in the context menu does not change the text when toggled.
Tchernobill  [ophavsmand] 22. aug. 2023 kl. 7:44 
version 1.4 aka Jaelee is out
shows only while aiming.
shows bare hand attack distance.
if TchernoLib is active, shows a thick circle.
Rex Renart 22. aug. 2023 kl. 5:58 
it's become too easy, i didn't approve that.
jaelee1111 17. juli 2023 kl. 10:41 
@horseshoecrabdevourer14350345.4

Change the code in the file "ShowAttackDistance.lua" as follows (commented out part is the original...):

function ShowAttackDistance.useValidWeapon(playerObj)

local weaponType = WeaponType.getWeaponType(playerObj)

-- if weaponType == WeaponType.barehand or weaponType == WeaponType.handgun or weaponType == WeaponType.firearm -- this is one line

if weaponType == WeaponType.handgun or weaponType == WeaponType.firearm


function ShowAttackDistance:render()

if ShowAttackDistance.isShowAttackDistance(self.playerObj) and ShowAttackDistance.useValidWeapon(self.playerObj) then -- this is one line

local weaponItem = self.playerObj:getPrimaryHandItem();

-- Insert the following lines of code:
if not weaponItem or weaponType == WeaponType.barehand then
weaponItem = InventoryItemFactory.CreateItem("Base.BareHands")
end
jaelee1111 17. juli 2023 kl. 10:26 
It would be better if the circle is displayed only when the player is aiming.

It can be done simply by adding one function call in the file "ShowAttackDistance.lua":

In the function "function ShowAttackDistance:render()"

Change the first line

"if ShowAttackDistance.isShowAttackDistance(self.playerObj) and ShowAttackDistance.useValidWeapon(self.playerObj) then"...

as follows:

"if self.playerObj:isAiming() and ShowAttackDistance.isShowAttackDistance(self.playerObj) and ShowAttackDistance.useValidWeapon(self.playerObj) then"...

This is simple insertion of self.playerObj:isAiming() in the if-statement.
drunk driving compilation #42 11. juni 2023 kl. 18:10 
is it possible to use this with fists/unarrmed?
Tchernobill  [ophavsmand] 21. apr. 2023 kl. 11:25 
version 1.3 is out
saves the visibility with player mod data.
adds Mod Manager icon.
Jamesrenar 31. dec. 2022 kl. 7:45 
dosent work for me
Tchernobill  [ophavsmand] 30. dec. 2022 kl. 6:47 
@[TT]SrZunbeX thanx for report.
[TT] .xMCP 28. dec. 2022 kl. 1:33 
i use it in steam multiplayer works fine for me and my frends @Cherri
Bunnies&Cherris 26. dec. 2022 kl. 15:07 
I second Seb, does this work in Multiplayer?
Captain ashbeard 2. dec. 2022 kl. 18:27 
distance circle has vanished mid game but displays it as visible when i right click at my feet
Enkipoumnel 1. dec. 2022 kl. 5:24 
это мне не понадобится , но круто :GiveHug:
𝕚𝕩𝕕 𓂀 𝕓𝕩𝕚 26. nov. 2022 kl. 11:43 
:D
Seb 9. nov. 2022 kl. 11:50 
Does this work with Multiplayer or is it not advised?
Tchernobill  [ophavsmand] 27. okt. 2022 kl. 14:12 
@RruinerR you can deactivate manually when changing weapon. For now that's all.
RruinerR 27. okt. 2022 kl. 14:07 
Is there a way (or could there be a way) to disable the melee range, but keep the range one?
Ghost 26. okt. 2022 kl. 9:02 
Great Idea!
MonsterSauce 22. okt. 2022 kl. 13:46 
urm, well.. I just updated on my end, now can snipe without worries.. LOL~
MonsterSauce 22. okt. 2022 kl. 13:40 
well, it's a good idea, but we forget, zombies has thier own raidus too, and where it interects, it will agro, so. that sound 30, could actually be 50 or more, cause of interect.

not worth investing., unless... you pair it with: say, while aiming the sound radius shrinks, then you can see the circle shrinking, then that would be useful..

not that im hinting on anything.. :P
Tchernobill  [ophavsmand] 22. okt. 2022 kl. 13:11 
@MonsterSauce Yeah, good idea. Maybe it could be drawn on the map & minimap.
MonsterSauce 22. okt. 2022 kl. 12:53 
yeah. nvm on my idea.. lol so useless. I've patch your mod to draw the sound distance of a gunshot. but at 30 tiles (.38 revolver).. it's like almost off the screen zoomed out completely. ...

[code]
local soundRay;
if weaponItem.isRanged and weaponItem:isRanged() then
soundRay = weaponItem:getSoundRadius()
local sR,sG,sB,sA = 0.8,0.4,0.4,1
self:renderIsoCircle(self.playerNum, posX, posY, posZ, soundRay, sR,sG,sB,sA)
end
[/code]
Tchernobill  [ophavsmand] 22. okt. 2022 kl. 11:46 
version 1.2 is out
Can be deactivated from right click at the feet of the character. (untick the contextual menu dedicated button to hide)
Tchernobill  [ophavsmand] 22. okt. 2022 kl. 11:37 
@Drconfused do you use the vanilla iso cursor ?
OPTIONS >> DISPLAY >> Cursor >> Aim outline (set AnyWeapon)
OPTIONS >> DISPLAY >> Cursor >> Iso cursor visibility (set it at 100% then decrease it as long at you can see it)
If you continue to loose it I do not know what can be done that would be better.
Drconfused 22. okt. 2022 kl. 11:20 
is it possible to have the direction the character is facing to have a marker... I tend to loose where the pointer is at and it has got me killed more than anything.
Tchernobill  [ophavsmand] 22. okt. 2022 kl. 9:56 
@MonsterSauce What are you talking about mate ? What do you have in mind ?

@trashcanhands good idea
MonsterSauce 22. okt. 2022 kl. 9:28 
please add sound of gun shot range too. i have it on my todo for the longest time.
trashcanhands 22. okt. 2022 kl. 5:59 
Is it possible for players to turn this on/off independently?
Tchernobill  [ophavsmand] 21. okt. 2022 kl. 21:17 
Thanx :)
Soldier :) 21. okt. 2022 kl. 12:42 
this is nice
Meganought 21. okt. 2022 kl. 5:25 
well thats a really simple and useful mod, thanks