Skip to content

Garages do not open / work #107

@JayFoxRox

Description

@JayFoxRox
  • There should be a garage class.
  • Garages should also open if the player is near them

At least the following garages must be supported in order to be able to play the game:

  • Pay'n'Spray; car drives in, player looses control, spraypaint effect happens, script can check if the specific garage just resprayed something (ResprayGarage)
  • Import/Export; compares vehicle id to from a list and strikes through the entry on the door, sets a bit in a bitstring which is also stored in savegames. Script has access to said bitstring (IEGarage)
  • Hideouts, any vehicle inside the garage is stored in the savegame (SaveGarage)
  • Mission garages, controllable by script, can only open and close / no special behaviour (StandardGarage)
  • Bombshop Garage, similar to respray but installs a specific type of bomb in the car (BombshopGarage, maybe we should have a class ShopGarage for BombshopGarage and ResprayGarage which takes control away from the player etc once inside the garage?)

You can find a full list of garge types here

It's currently not known how the game knows which object is the garage door.
The garages are created from the script or a savegame. A garage is created as a specific type, and each type can have multiple garages associated with it.
The script also controls how each garage opens (swing door / slide door). It's a miracle how the game can know which garage number (which is independent from the type!) controls which door object.

There is a list which links different garages to their respective door model. However, each door model appears multiple times and the game somehow figures out which door is the correct one.

It's not known if the garage door objects might be hardcoded independent of the garages.
We should test if garage doors open, even if no garage is created from the script / savegame.

From the script the garages are identified by a number (the order they are created in the SCM, starting at index 1, index 0 is some unused (broken?) garage I believe). The index of each garage is then stored in the global variables listed on the list above.


Standard doors (such as the one to mistys house) and gates are created as instance object by script or savegame.
They are opened and closed by setting the heading / z_angle using the script or some slide opcode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions