Code: Select all
function widget:GetInfo()
return {
name = "MotionTrack
desc = "Pings Enemy",
author = "PicassoCT",
date = "Juli,5,2012",
license = "tokill v.007",
layer = 0,
enabled = false
}
end
local motiontrack = "motiontrack"
local Echo = Spring.Echo
function widget:Initialize()
end
function widget:UnitSelect(unitID, unitDefID, unitTeam)
do
{
if (targetdistance<radardistance)
{
if (targetdistance<(radardistance*0.3))
{PlaySoundFile()`/cent/sentry/hipitch.wav` sleep 25}
else
if (targedistance<(radardistance*0.5))
{PlaySoundFile()`/cent/sentry/midpitch.wav` sleep 35}
else
if (targedistance<(radardistance*0.8))
{PlaySoundFile()`/cent/sentry/midpitch.wav` sleep 45}
else
{PlaySoundFile()`/cent/sentry/stbeep.wav` sleep 75}
}
else
{PlaySoundFile()`/cent/sentry/trackcrack.wav`
sleep 90}
} while (unitselect==true&&unitdefid==sentry&&sentrynell)
else
{-- my base the unit does nothing}
end
------ -- -