Does anyone know how to write a script that checks if a given vector is visible through another vector that is not behind a wall?
I will give a picture for example: Imgur: The magic of the Internet
Does anyone know how to write a script that checks if a given vector is visible through another vector that is not behind a wall?
I will give a picture for example: Imgur: The magic of the Internet
hmm kinda sus
In v2 you were able to make functions like this:
local visible = point:is_visible(enemy) -- position:is_visible(by_entity)
By now, you can only trace damage at position and check if it’s higher than X.
local damage, trace = utils.trace_bullet(enemy, enemy_eye, point)
if damage < 1 or (trace and trace.entity ~= nil) then
return
end
I’m also checking if the traced entity (entity that got hit by the trace) is nil, so I’m sure that there are no players that would block the enemy’s shot (if you’re makin’ AI peek/freestanding/etc.).
what entity should be determined by the entity named “point”
entity.get_threat()
Getting enemy that neverlose is currently targeting.