Data Realms Fan Forums
http://45.55.195.193/

EDV problem
http://45.55.195.193/viewtopic.php?f=73&t=46284
Page 1 of 1

Author:  Greenclone [ Sun Sep 30, 2018 4:13 pm ]
Post subject:  EDV problem

EDV was a great mod, but now it seems the lua is broken, the APC does not shoot any of its weapons.

console output is

with the second line repeating.

The variable "Barrel" should be assigned the APC gun, but instead becomes nil.

Attached is the mod and lua, script is under the filepath EDV.rte/ArmoredCar/ArmoredCar.lua

Any help would be greatly appreciated.

Attachments:
EDV_R12.zip [708.03 KiB]
Downloaded 769 times
ArmoredCar.lua [11.38 KiB]
Downloaded 801 times

Author:  Bad Boy [ Sun Sep 30, 2018 5:55 pm ]
Post subject:  Re: EDV problem

A quick inspection suggests there's a name conflict with the script and newer versions of CC because there's now a property of ACrab's called Turret.
Try opening the script, searching for self.Turret, and renaming it to self.myTurret everywhere (or some other name, as long as it's the same throughout). Hopefully this'll fix it, or at least reveal whatever else doesn't work.

Author:  Greenclone [ Sun Sep 30, 2018 6:04 pm ]
Post subject:  Re: EDV problem

Works flawlessly, thank you!

Also, is there any place on the forums or elsewhere that contains a complete list of lua documentation for cortex command? The wiki is kinda lame and incomplete.

Author:  Bad Boy [ Tue Oct 02, 2018 3:30 am ]
Post subject:  Re: EDV problem

Cheers, glad it works. And no, the wiki's basically it for documentation. The index page with all the game's datatypes is helpful if you know what you're looking for already.
If you're looking to learn lua instead of looking for docs, weegee's stickied mission making ones are good even if mission making isn't your goal, and there are plenty of general lua tutorials around the internet - pil (programming in lua) has a bunch of info.

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