Re: Need help with the medic lua script.
1. The script makes the bot heal 1 health every 100 milliseconds (1/10th of a second), you can slow this down by lowering the amount healed, though that might not work, or by making the healing happen less often. To do the former change line 27 so it's:
Code:
self.HealTarget.Health = math.min(self.HealTarget.Health+[some_number_less_than_1], 100)
To do the latter (which I recommend) change line 3 to be:
Code:
self.HealTimer:SetSimTimeLimitMS([some_number_greater_than_100])
2. Line 48 is the relevant line here:
Code:
if SceneMan:CastObstacleRay(self.EyePos, Trace, Vector(), Vector(), self.ID, self.IgnoresWhichTeam, 0, 3) < 0 then
This line checks if there's anything in between the actor's eye position and the potential target, but the part that says self.ID makes it ignore itself (see docs [url=http://wiki.datarealms.com/LuaDocs/SceneManager#CastObstacleRay]here[/ur]). There are various ways you could fix it, but an easy one is to make the script first check if the potential target is the actor itself, so and then not do the obstactle check. To do this, you could change line 48 to:
Code:
if Act.UniqueID == self.UniqueID or SceneMan:CastObstacleRay(self.EyePos, Trace, Vector(), Vector(), self.ID, self.IgnoresWhichTeam, 0, 3) < 0 then
If this doesn't work, try replacing UniqueID with ID where I put it in.