Difference between revisions of "GRGE"

From GTAMods Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
'''GRGE''' is one of the plain-text [[IPL]] sections, introduced with [[San Andreas]]. It replaces the previously used opcodes [[0219]], [[03BB]] and [[057A]]. It creates an invisible cube which interacts as a [[garage]]. Each garage can be used differently, for example by the [[script]].
 
'''GRGE''' is one of the plain-text [[IPL]] sections, introduced with [[San Andreas]]. It replaces the previously used opcodes [[0219]], [[03BB]] and [[057A]]. It creates an invisible cube which interacts as a [[garage]]. Each garage can be used differently, for example by the [[script]].
  
== San Andreas Format ==
+
== Format ==
The format itself is easy, but understanding it seems hard. However the position values are pretty flexible and you can describe one garage in multiple ways.
+
{|{{Prettytable}} width="100%"
 
+
! width="10px"| {{Icon|SA}}
PosX, PosY, PosZ, LineX, LineY, CubeX, CubeY, CubeZ, DoorType, GarageType, Name
+
! width="150px"| Identifier
 
+
! width="100px"| Type
{|{{Prettytable}} width="100%" class="collapsible"
+
! Description
!width="250px"|Identifier
 
!Description
 
|-
 
|<center>PosX, PosY, PosZ</center>||A coordinate of one of the corner marks
 
 
|-
 
|-
|<center>LineX, LineY</center>||Those values are [[Wikipedia:Euclidean_vector#Addition_and_subtraction|added]] to the first position values. They define one edge of the box
+
| <center>A,B,C</center> || <center>PosX, PosY, PosZ</center> || float[3] || A coordinate of one of the corner marks
 
|-
 
|-
|<center>CubeX, CubeY, CubeZ</center>||Another world coordinate. Together with the abstract line created with the first 5 coordinates this forms a cube in the world.
+
| <center>D,E</center> || <center>LineX, LineY</center> || float[2] || Those values are [[Wikipedia:Euclidean_vector#Addition_and_subtraction|added]] to the first position values. They define one edge of the box
 
|-
 
|-
|<center>DoorType</center>||The type of the door
+
| <center>F,G,H</center> || <center>CubeX, CubeY, CubeZ</center> || float[3] || Another world coordinate. Together with the abstract line created with the first 5 coordinates this forms a cube in the world.
 
|-
 
|-
|<center>GarageType</center>||The type of the garage{{ref|1}}
+
| <center>I</center> || <center>DoorType</center> || integer || The type of the door ([[#Types of doors|see below]])
 
|-
 
|-
|<center>Name</center>||A string which is used to manipulate the garages behaviour through the <code>[[main.scm]]</code>{{ref|2}}
+
| <center>J</center> || <center>GarageType</center> || integer || The type of the garage{{ref|1}}
 
|-
 
|-
 +
| <center>K</center> || <center>Name</center> || string || A string which is used to manipulate the behaviour of garages through the <code>[[main.scm]]</code>{{ref|2}}
 
|}
 
|}
  
Line 66: Line 63:
 
* {{note|2}} [[Garage#San_Andreas_2|List of all default garage names (SA)]]
 
* {{note|2}} [[Garage#San_Andreas_2|List of all default garage names (SA)]]
  
== External Link ==
+
== External links ==
* {{GTAF|202532|IPL documentation topic}}
+
* {{GTAF|200033&#38;st&#61;240|Discussion of save garage creation through IPL}}
 +
* {{GTAF|post|202532|3973453|Discussion of garage creation}}
  
 
{{SA-navi}}
 
{{SA-navi}}
  
 
[[Category:GTA_LCS]][[Category:GTA_VCS]]
 
[[Category:GTA_LCS]][[Category:GTA_VCS]]

Revision as of 19:05, 24 September 2010

GRGE (IPL section)
Short description:Creates a garage
Supported games:GTA SA, GTA LCS, GTA VCS
IPL Sections:
2DFX AUZO BLOK CARS CULL ENEX GRGE
INST JUMP LINK LODM MLO+ MULT OCCL
PATH PICK RTFX SLOW TCYC VNOD ZONE

GRGE is one of the plain-text IPL sections, introduced with San Andreas. It replaces the previously used opcodes 0219, 03BB and 057A. It creates an invisible cube which interacts as a garage. Each garage can be used differently, for example by the script.

Format

San Andreas Identifier Type Description
A,B,C
PosX, PosY, PosZ
float[3] A coordinate of one of the corner marks
D,E
LineX, LineY
float[2] Those values are added to the first position values. They define one edge of the box
F,G,H
CubeX, CubeY, CubeZ
float[3] Another world coordinate. Together with the abstract line created with the first 5 coordinates this forms a cube in the world.
I
DoorType
integer The type of the door (see below)
J
GarageType
integer The type of the garage[1]
K
Name
string A string which is used to manipulate the behaviour of garages through the main.scm[2]

Types of doors

Flag Description
1 door opens up and out, camera remotely follows player
2 door opens straight up, camera remotely follows player
3 door opens up and in, camera remotely follows player
4 door opens straight up, camera follows player
5 door opens up and out, camera follows player
6 door opens straight up, camera follows player
7 door opens up and in, camera follows player

The garage door only opens if the IDE flag value of the door is 2048 and the door is defined in the object.dat file.

Notes

Garage doors are very important for the camera rotation. They control how the camera moves after you have entered a garage. If your camera moves wrong, then simply rotate the pivot of your garage door, map the new one and rotate it until it fits with the rotation you want. Then test if the camera moves correctly in-game.

If you have not mapped a garage door the camera will move to the west, which corresponds to a garage door rotation of 0 degrees around the z axis.

See also

External links