Game Development Community

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
Page«First 1 2 Next»
#21
07/09/2006 (11:03 pm)
Function WeaponImage::onAttack(%this, %player, %slot)
{
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.
Page«First 1 2 Next»