Skip to content

Commit 6dec017

Browse files
committed
Dimension & Interior pages
1 parent c8f0517 commit 6dec017

File tree

2 files changed

+101
-0
lines changed

2 files changed

+101
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
import AutoStarlightPage from "@src/components/AutoStarlightPage.astro";
3+
import SeeAlsoSection from "@src/components/SeeAlsoSection.astro";
4+
import { getSeeAlsoLinksFromList } from "@src/utils/general";
5+
---
6+
7+
<AutoStarlightPage frontmatter={{
8+
template: 'doc',
9+
title: 'Dimension',
10+
tableOfContents: false,
11+
}}>
12+
13+
<p>Dimensions are a way of separating parts of the game world from each other. Each dimension can contain elements of the types listed below. These are are only visible to players in the same dimension. You can, in theory, have up to 65535 dimensions.</p>
14+
15+
<p>The following <a href="/reference/Element/">Element</a> types can be used in the Dimension system:</p>
16+
<ul>
17+
<li><a href="/reference/player/">Player</a></li>
18+
<li><a href="/reference/ped/">Ped</a></li>
19+
<li><a href="/reference/vehicle/">Vehicle</a></li>
20+
<li><a href="/reference/object/">Object</a></li>
21+
<li><a href="/reference/pickup/">Pickup</a></li>
22+
<li><a href="/reference/marker/">Marker</a></li>
23+
<li><a href="/reference/colshape/">Collision shape</a></li>
24+
<li><a href="/reference/blip/">Blip</a></li>
25+
<li><a href="/reference/radararea/">Radar area</a></li>
26+
<li><a href="/reference/team/">Team</a></li>
27+
<li><a href="/reference/sound/">Sound</a></li>
28+
<li><a href="/reference/weapon/">Weapon</a></li>
29+
<li><a href="/reference/light/">Light</a></li>
30+
<li><a href="/reference/water/">Water</a></li>
31+
<li>Custom dummy elements (<a href="/reference/createElement/">createElement</a>)</li>
32+
</ul>
33+
34+
<p>The camera's dimension is updated when:</p>
35+
<ul>
36+
<li>The local player joins the server (set to 0)</li>
37+
<li><a href="/reference/resetMapInfo/">resetMapInfo</a> is called (set to 0)</li>
38+
<li>The local player spawns (set to the player's dimension)</li>
39+
<li><a href="/reference/setElementDimension/">setElementDimension</a> is called</li>
40+
</ul>
41+
42+
<h3>Uses</h3>
43+
<p>A useful use of this is for unique <a href="/reference/interior/">interiors</a>. For example, there is only one actual Pizza restaurant in San Andreas, with each warp point going to the same place. This works fine in single player games (as you aren't going to be in two places at once), but with multiplayer this can be confusing, as you could enter in one place and see all the players who entered in another. To avoid this, you can split the players into dimensions, so they will only see players who entered in the same place, duplicating the Pizza restaurant interior as many times as you want with different dimensions.</p>
44+
45+
<h3>Relevant scripting functions</h3>
46+
<ul>
47+
<li><a href="/reference/setElementDimension/">setElementDimension</a></li>
48+
<li><a href="/reference/getElementDimension/">getElementDimension</a></li>
49+
<li><a href="/reference/spawnPlayer/">spawnPlayer</a></li>
50+
</ul>
51+
52+
<SeeAlsoSection seeAlsoLinks={getSeeAlsoLinksFromList([
53+
'reference:Interior',
54+
'reference:Entity',
55+
])} currentId='' />
56+
57+
</AutoStarlightPage>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
import AutoStarlightPage from "@src/components/AutoStarlightPage.astro";
3+
import SeeAlsoSection from "@src/components/SeeAlsoSection.astro";
4+
import { getSeeAlsoLinksFromList } from "@src/utils/general";
5+
---
6+
7+
<AutoStarlightPage frontmatter={{
8+
template: 'doc',
9+
title: 'Dimension',
10+
tableOfContents: false,
11+
}}>
12+
13+
<p>An interior in GTA is an area that isn't 'outside'. For example, inside houses, casinos, restaurants, shops etc. Players can not, by default, access these. You can use various scripting functions to move elements into these interiors. When you change the interior a player is in, they can only see the non-player elements in that interior. Players can see each other in whatever interior they are in.</p>
14+
15+
<p>You can have up to 255 interiors, interior 0 being the first one and referring to the normal GTA world.</p>
16+
17+
<p>The camera's interior is updated when:</p>
18+
<ul>
19+
<li>The local player joins the server (set to 0)</li>
20+
<li><a href="/reference/resetMapInfo/">resetMapInfo</a> is called (set to 0)</li>
21+
<li>The local player spawns (set to the player's interior)</li>
22+
<li><a href="/reference/setElementInterior/">setElementInterior</a> is called</li>
23+
</ul>
24+
25+
<h3>Uses</h3>
26+
<p>To allow a player to enter an interior, you should use the <a href="/reference/setElementInterior/">setElementInterior</a> function on the player you wish to move. You can also use this function on other elements, for example to make a vehicle or object appear in the interior.</p>
27+
28+
<h3>Dimensions</h3>
29+
<p>The original GTA interiors are reused in a number of places throughout the game - e.g. each fast food restaurant interior is used many times. <a href="/reference/Dimension/">Dimensions</a> are a feature that was added to MTA to solve this problem. You can allocate each instance of the interior a separate dimension which will mean that the players in each dimension won't be able to see each other or interact with each other. This will mean that the interiors appear to be entirely separate, despite physically being in the same place.</p>
30+
31+
<h3>Relevant scripting functions</h3>
32+
<ul>
33+
<li><a href="/reference/setElementInterior/">setElementInterior</a></li>
34+
<li><a href="/reference/getElementInterior/">getElementInterior</a></li>
35+
<li><a href="/reference/spawnPlayer/">spawnPlayer</a></li>
36+
</ul>
37+
38+
<SeeAlsoSection seeAlsoLinks={getSeeAlsoLinksFromList([
39+
'reference:Dimension',
40+
'reference:ID_Lists/Interiors',
41+
'reference:Entity',
42+
])} currentId='' />
43+
44+
</AutoStarlightPage>

0 commit comments

Comments
 (0)