Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ported first GDI mission to Lua #4386

Merged
merged 3 commits into from Dec 31, 2013
Merged

Ported first GDI mission to Lua #4386

merged 3 commits into from Dec 31, 2013

Conversation

Mailaender
Copy link
Member

my first attempts with the in-game Lua scripts. Improvements include a simpler victory check and the gunboat works properly now. Fixed some NREs related to RejectsOrders and made it shoot and move. Also fixed Reinforcements.Insert with the help of @phrohdoh.

@@ -2,8 +2,7 @@ Reinforcements = { }

Reinforcements.Insert = function(owner, transportName, passengerNames, enterPath, exitPath)
local facing = { Map.GetFacing(CPos.op_Subtraction(enterPath[2], enterPath[1]), 0), "Int32" }
local altitude = { Rules.InitialAltitude(transportName), "Int32" }
local transport = Actor.Create(transportName, { Owner = owner, Location = enterPath[1], Facing = facing, Altitude = altitude })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to add local center = WPos.op_Addition(enterPath[1].CenterPosition, WVec.New(0, 0, Rules.InitialAltitude(transportName).Range)) and then CenterPosition = center to Actor.Create.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still isn't right - you'll need to remove the .Range from here, and add it inside Rules.InitialAltitude instead.

@pchote
Copy link
Member

pchote commented Dec 28, 2013

"BUG: In order targeter - decided on Move but then didn't order" when attempting to move the gunboat.
I'm not sure if this is new, or an existing issue.

@Mailaender
Copy link
Member Author

That is a trade off for a crash. Not sure how to fix RejectsOrders: properly.

@pchote
Copy link
Member

pchote commented Dec 28, 2013

Looks and plays good otherwise, great job!

@pchote
Copy link
Member

pchote commented Dec 28, 2013

👍, pending any comments from @ScottNZ

@pchote
Copy link
Member

pchote commented Dec 28, 2013

There are a couple of minor polish issues (gunboat will override any manually chosen targets, hovercraft renders above cargo and turns around instead of reversing), but these can be cleaned up in follow up patches.

@Mailaender
Copy link
Member Author

Fixed the hovercraft turning around. The original artwork fits better here. No idea on how to solve that offset problem. The gunboat ignoring manual targets may be bad, but it seems to know best how to clear the coast and it is better than having one that is idle and just gets destroyed so I am happy with it for now.

{
this.unitType = unitType;
var reject = self.TraitOrDefault<RejectsOrders>();
rejectMove = reject != null && !reject.Except.Contains("Move");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the self.AcceptsOrder helper?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it in #4396

@ScottNZ
Copy link
Contributor

ScottNZ commented Dec 30, 2013

👍

@Mailaender
Copy link
Member Author

Updated. Moved the required alone standing fixes into #4395 and #4396. I now also replaced the GoodGuy/BadGuy notation because we show that in tooltips.

@pchote
Copy link
Member

pchote commented Dec 30, 2013

I now also replaced the GoodGuy/BadGuy notation because we show that in tooltips.

I wouldn't be too concerned about this - we will be fixing that in the near future.

@pchote
Copy link
Member

pchote commented Dec 31, 2013

There are a couple of crashes in the pr as-filed, but these are fixed in other PRs.

pchote added a commit that referenced this pull request Dec 31, 2013
Ported first GDI mission to Lua
@pchote pchote merged commit 45894a9 into OpenRA:bleed Dec 31, 2013
@Mailaender Mailaender deleted the gdi01-lua branch December 31, 2013 09:30
@obrakmann obrakmann mentioned this pull request Mar 29, 2014
8 tasks
@Mailaender Mailaender mentioned this pull request May 30, 2014
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants