Author Topic: Garage Cargo  (Read 1166 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3208
Garage Cargo
« 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...
« Last Edit: May 11, 2009, 05:00:23 PM by Sirbomber »
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4829
Garage Cargo
« Reply #1 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!)