Capturing vehicles

Information and discussion for custom maps and mods.
Post Reply
Proteus
Posts: 23
Joined: Wed Jun 08, 2011 2:42 pm

Capturing vehicles

Post by Proteus »

Around 6-7 months ago I made an infantry unit that was able to capture vehicles, I did so by adding Capturable to vehicles and it allowed my new unit to capture the vehicle.

Unfortunately, one of the changes I found in "Capturable" that was done about a month ago, no longer allows me to capture vehicles because vehicles lack the "Building" trait (the game crashes and gives me an error saying that the object trying to be captured lacks the "Building" trait)

https://github.com/chrisforbes/OpenRA/b ... turable.cs

Code: Select all

+      if &#40;!CaptureInProgress && !self.Trait<Building>&#40;&#41;.Lock&#40;&#41;&#41;
+        return false;
I really don't know much about actual programming, but is it possible to change it so it ignores this part if the object I want to capture isn't a "Building"?

Matt
Posts: 1155
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post by Matt »

I guess this is a workaround for the bug where you undeploy your construction yard and it becomes a neutral MCV when the capture is in progress. Ask chrisf in #openra how to solve this so you can still capture vehicles.

Post Reply