I'm doing a coalition medic troop (for a mod i'm making) and i'm using the medic lua script, from the medic robot. The thing is that i want to change it up a bit, but i don't know how. I want to make it so that A: It heals at a slower rate and B: It can heal itself (preferably at an even slower rate). Anyone can help me with this?

Fri Apr 27, 2018 6:50 pm

Bad Boy

Joined: Fri Sep 10, 2010 1:48 amPosts: 649Location: Halifax, Canada

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:

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:

Who is online

Users browsing this forum: No registered users

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum