I've got a question about LOS
by Max · in Torque Game Engine · 07/09/2006 (1:10 am) · 21 replies
How do I get the object in a players line of sight? in darkstar I call a function and it gets assigned to $los::object, but Im not sure about Torque
About the author
Torque 3D Owner Max
{
echo(" -----------WeaponImage::onAttack-------------");
%weapon = %player.getMountedImage($WeaponSlot);
echo("player = "@%player);
echo("weapon = "@$numtodata[%weapon]);
%obj = Player::GetLOSObject(%player);
echo(%obj);
echo(" -----------End WeaponImage::onAttack-------------");
Armor::damage(%player, %obj, "", player::getposition(%this),$Damage[$NumToData[%weapon]],"MeleeDamage");
}
called by a weapon.