Return values: returns entity index and number fraction.
[EN] Used for advanced line tracing.
[RU] ΠΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΡΡ Π΄Π»Ρ ΡΠ°ΡΡΠΈΡΠ΅Π½Π½ΠΎΠΉ ΡΡΠ°ΡΡΠΈΡΠΎΠ²ΠΊΠΈ Π»ΠΈΠ½ΠΈΠΉ.
Smoke
Parameters: array start, array end
function isBehindSmoke(entity_index)
{
eyepos = Entity.GetEyePosition(Entity.GetLocalPlayer());
if (Entity.IsValid(entity_index) && Entity.IsAlive(entity_index) && !Entity.IsDormant(entity_index)){
hitbox_pos = Entity.GetHitboxPosition(entity_index, 0);
result = Trace.Smoke(eyepos, hitbox_pos);
if (result == 1)
{
return true
}
else
{
return false
}
}
}
function main()
{
enemies = Entity.GetEnemies()
for (i=0; i < enemies.length; i++)
{
if (isBehindSmoke(enemies[i]))
{
Cheat.Print("Enemy: " + Entity.GetName(enemies[i])+ " is behind smoke\n")
}
}
}
Cheat.RegisterCallback("CreateMove", "main");
Return values: returns 1 if there was smoke.
[EN] Used to check if smoke is between two points.
[RU] ΠΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΡΡΡ Π΄Π»Ρ ΠΏΡΠΎΠ²Π΅ΡΠΊΠΈ Π½Π°Π»ΠΈΡΠΈΡ Π΄ΡΠΌΠ° ΠΌΠ΅ΠΆΠ΄Ρ Π΄Π²ΡΠΌΡ ΡΠΎΡΠΊΠ°ΠΌΠΈ.
Bullet
Parameters: int ent_index, int target, array start, array end
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.