Search found 7 matches

by jeremy1337
Tue May 10, 2022 7:12 am
Forum: Mapping and Modding
Topic: Naughty ore trucks in Lua
Replies: 4
Views: 248

Re: Naughty ore trucks in Lua

Your feeling was right that loads of exceptions get thrown when trying to use a harvester without certain traits. This happened even with the more detailed code you posted. So I took your advice and figured out how to create a new unit. It looks like an ore truck, and responds to scripted commands l...
by jeremy1337
Mon May 09, 2022 12:45 pm
Forum: Mapping and Modding
Topic: Naughty ore trucks in Lua
Replies: 4
Views: 248

Re: Naughty ore trucks in Lua

Hi abcdefg30 thanks for the reply. I've not made a custom unit before and have the following code which works correctly: COMB: Inherits: HARV Tooltip: Name: Combine RenderSprites: Image: HARV Harvester: What's the syntax to totally remove the harvester trait please? I've not stuck the map online any...
by jeremy1337
Fri May 06, 2022 1:09 pm
Forum: Mapping and Modding
Topic: Naughty ore trucks in Lua
Replies: 4
Views: 248

Naughty ore trucks in Lua

Hello, grateful please for some help from anybody with experience in Lua scripting. I have a mission map with two neutral ore trucks. I'm using them as scenery. Neither is being issued any commands. When the mission loads, one of the ore trucks sits still. The other ore truck, the naughty one, decid...
by jeremy1337
Sat Apr 09, 2022 9:58 am
Forum: Mapping and Modding
Topic: Lua win conditions
Replies: 6
Views: 580

Re: Lua win conditions

Thanks abcdefg30 that's very helpful. No further questions! :)
by jeremy1337
Thu Apr 07, 2022 8:31 pm
Forum: Mapping and Modding
Topic: Lua win conditions
Replies: 6
Views: 580

Re: Lua win conditions

Hi, that solved both questions thank you, just some small followups please: 1) The following code prints correctly but all it spits back is "Actor (fact 12)", so I'm wondering how to get a bit more info on the objects without knowing what they are beforehand. I'm not sure if this an openra-specific ...
by jeremy1337
Wed Apr 06, 2022 7:38 pm
Forum: Mapping and Modding
Topic: Lua win conditions
Replies: 6
Views: 580

Re: Lua win conditions

Hello abcdefg30 that's done the trick, thanks ever so much :) Just while I've got your attention 1) I'm a C++ dev with quite a lot of experience but haven't used Lua before. In the openra API, is there an equivalent of PHP's vardump where I can spit out arrays into the log file to see what they cont...
by jeremy1337
Wed Apr 06, 2022 7:22 am
Forum: Mapping and Modding
Topic: Lua win conditions
Replies: 6
Views: 580

Lua win conditions

Hi all, super grateful for any help from people knowledgable about the Lua API please. Background I'm setting up a mission where one human and one AI start on an empty map with one MCV each. Their MCVs appear via the Reinforcements.Reinforce() command, which works correctly. The winning condition fo...