Data Realms Fan Forums
http://forums.datarealms.com/

Auto heal in b27
http://forums.datarealms.com/viewtopic.php?f=73&t=45999
Page 1 of 1

Author:  johiah [ Mon Oct 26, 2015 1:09 pm ]
Post subject:  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

Author:  Bad Boy [ Mon Oct 26, 2015 7:11 pm ]
Post subject:  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.

Author:  johiah [ Mon Oct 26, 2015 9:36 pm ]
Post subject:  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.

Author:  johiah [ Mon Oct 26, 2015 9:47 pm ]
Post subject:  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 365 times
Maul.lua [2.98 KiB]
Downloaded 365 times
DarthMaul.ini [12.84 KiB]
Downloaded 356 times

Author:  Bad Boy [ Tue Oct 27, 2015 3:53 am ]
Post subject:  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.

Author:  johiah [ Tue Oct 27, 2015 12:18 pm ]
Post subject:  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.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/