Capturing vehicles
Posted: Thu Oct 11, 2012 9:39 am
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
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"?
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 (!CaptureInProgress && !self.Trait<Building>().Lock())
+ return false;