function init() --CarShape = FindShape("CarShape") --CarVoxelCountStart = (GetShapeVoxelCount(CarShape)*0.9) TargetVehicle = FindVehicle("TargetVehicle") target = FindBody("target") end function tick(dt) --local CarVoxelCountDelta = GetShapeVoxelCount(CarShape) --if CarVoxelCountStart > CarVoxelCountDelta then --SetString("level.state", "fail_dead") --end local TargetVehicleHealth = GetVehicleHealth(TargetVehicle) if TargetVehicleHealth <= 0.9 and HasTag(target, "target") then SetString("level.state", "fail_dead") end end