View unanswered posts | View active topics It is currently Sat May 27, 2017 4:39 pm



Reply to topic  [ 6 posts ] 
 Auto heal in b27 
Author Message

Joined: Tue Oct 20, 2015 2:56 am
Posts: 62
Location: Under a bridge.
Reply with quote
Post Auto heal in b27
Ok so I have the galactic empire installed in a B27 install, doing some expirimenting, and I want to fix the auto heal for star wars characters. This is the current code for darth vader and it doesn't work.
if self.garbTimer:IsPastSimMS(1300 - (100 - health)*2) then
collectgarbage("collect");
self.garbTimer:Reset();
if self.Health < 100 then
self.Health = self.Health + 1;
end
end
The same code for darth maul's is the same except it doesn't have the times 2. It has times 3 and the IsPastSimsMS(1030 - etc


Mon Oct 26, 2015 1:09 pm
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 612
Location: Halifax, Canada
Reply with quote
Post Re: Auto heal in b27
What's going wrong? Open the console with ~ or / and write down the error message in it (or quit the game and copy the message from the LogConsole.txt file). The code in here looks fine, assuming the health and garbTimer in line 1 and the collectgarbage function are all defined.
Without looking at the rest of the code or getting an error message I can't say what's going wrong, but if I had to guess I'd say that health should be replaced with self.Health in case health isn't defined.


Mon Oct 26, 2015 7:11 pm
Profile

Joined: Tue Oct 20, 2015 2:56 am
Posts: 62
Location: Under a bridge.
Reply with quote
Post Re: Auto heal in b27
Bad Boy wrote:
What's going wrong? Open the console with ~ or / and write down the error message in it (or quit the game and copy the message from the LogConsole.txt file). The code in here looks fine, assuming the health and garbTimer in line 1 and the collectgarbage function are all defined.
Without looking at the rest of the code or getting an error message I can't say what's going wrong, but if I had to guess I'd say that health should be replaced with self.Health in case health isn't defined.


I will try replacing health with that, also there is no error in the console, they just dont heal.
Also if you want I can upload the maul lua file.


Mon Oct 26, 2015 9:36 pm
Profile

Joined: Tue Oct 20, 2015 2:56 am
Posts: 62
Location: Under a bridge.
Reply with quote
Post Re: Auto heal in b27
self.Health didn't work either, here is the debug console, maul's .ini and his lua script. If you need any other folders let me know. NOTE: To allow the mod to launch with b27 I had to edit the actors index.ini and remove the ronin jedi thing, it was causing a crash at start. May be what some of those console errors are.
Edit. None of the lua scripts ppear to have loaded or something, the side dash they are supposed to have doesn't work either. Strike that, the force does so I dunno.


Attachments:
DebugConsole.txt [13.3 KiB]
Downloaded 38 times
Maul.lua [2.98 KiB]
Downloaded 39 times
DarthMaul.ini [12.84 KiB]
Downloaded 39 times
Mon Oct 26, 2015 9:47 pm
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 612
Location: Halifax, Canada
Reply with quote
Post Re: Auto heal in b27
The issue is probably that you're running the mod in B27, looking at the actor scripts they need a more modern version of the actor ai. I'm not sure what version of the game the mod was released for but I guess try it with that version or with the most recent game version, since I don't remember exactly when the ai format switched over.


Tue Oct 27, 2015 3:53 am
Profile

Joined: Tue Oct 20, 2015 2:56 am
Posts: 62
Location: Under a bridge.
Reply with quote
Post Re: Auto heal in b27
Bad Boy wrote:
The issue is probably that you're running the mod in B27, looking at the actor scripts they need a more modern version of the actor ai. I'm not sure what version of the game the mod was released for but I guess try it with that version or with the most recent game version, since I don't remember exactly when the ai format switched over.


Ok thanks.


Tue Oct 27, 2015 12:18 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users


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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.032s | 16 Queries | GZIP : Off ]