Code: Select all
if (isalive self && isalive local.player && sighttrace self.gun1.origin local.player.origin 1 64 local.sightrange) (global/cerebralarmor.scr, 158)
if (isalive self && isalive local.player && ^
^~^~^ Script Error: Cannot cast 'int' to vector
xtank can not find a target. Waiting 6 seconds before another search.And heres the code its referring to:
Code: Select all
for (local.p = 1; local.p <= $player.size; local.p++)
{
local.player = $player[local.p]
// if (isalive self && isalive $player[local.p] && self.spotter cansee $player[local.p] 90 local.sightrange)
if (isalive self && isalive local.player && sighttrace self.gun1.origin local.player.origin 1 64 local.sightrange)
{
self.enemytarget = local.player
self thread tank_attack local.sightrange
end
}
}
println (self + " can not find a target. Waiting 6 seconds before another search.")