Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Sirbomber on May 11, 2009, 04:54:08 PM

Title: Garage Cargo
Post by: Sirbomber on May 11, 2009, 04:54:08 PM
So I decided I want vehicles to start off in a Garage.  I know it's possible; Eden/Plymouth 1 do it on the higher difficulty levels.  I tried using .SetFactoryCargo and met with unfortunate results (the game crashed).  Any suggestions?  I noticed a "PutInGarage" function, but it has arguments for x and y?!  I might poke at that a bit...

Edit: Oooookay... If I spawn a unit on top of the Garage and call PutInGarage it works...
Title: Garage Cargo
Post by: Hooman on May 12, 2009, 10:36:48 PM
Yeah, that's pretty much it. You spawn the unit on the map first with CreateUnit, and the call that function with the coordinates of the unit to move it into the garage. Sort of a weird system, but that's how the original levels do it.

I'm not sure if the unit has to be anywhere near the garage though. That might be an interesting experiment to post about. (Include sample code!)