Return values: returns entity index, damage, visibility, and hitbox.
[EN] Used to trace bullet between two entities.
[RU] Используется для отслеживания маркера между двумя объектами.
Line
Parameters: int ent_index, array start, array end
Fraction info: 1.0 means it didnt hit anything, 0.5 means it hit something half way through, 0.1 is hit
function isVisible()
{
localPlayer_index = Entity.GetLocalPlayer();
localPlayer_eyepos = Entity.GetEyePosition(localPlayer_index);
enemies = Entity.GetEnemies();
for ( i = 0; i < enemies.length; i++)
{
hitbox_pos = Entity.GetHitboxPosition(enemies[i], 0);
result = Trace.Line(localPlayer_index, localPlayer_eyepos, hitbox_pos);
Cheat.Print("Entity: " + Entity.GetName(result[0]) + " fraction: " + result[1] + "\n");
}
}
Cheat.RegisterCallback("Draw", "isVisible");
// This function will trace line from localplayer eye position to enemy head hitbox position and return whether the enemy is visible or not
Return values: returns entity index and number fraction.
[EN] Used to trace line between point A and B.
[RU] Используется для прокладки линии между точками A и B.