Interior: Difference between revisions
No edit summary |
m (add UpdateDimensionInterior, remove toc) |
||
(8 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
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. | 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. | ||
You can have up to 255 interiors, interior 0 being the first one and referring to the normal GTA world. | You can have up to 255 interiors, interior 0 being the first one and referring to the normal GTA world. | ||
{{UpdateDimensionInterior}} | |||
==Uses== | ==Uses== | ||
To allow a player to enter an interior, you should use the [[setElementInterior]] 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. | To allow a player to enter an interior, you should use the [[setElementInterior]] 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. | ||
==Dimensions== | |||
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. [[Dimension|Dimensions]] 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. | |||
==Relevant scripting functions== | |||
*[[getElementInterior]] | |||
*[[setElementInterior]] | |||
*[[spawnPlayer]] | |||
==See Also== | ==See Also== | ||
* [[ | * [[Interior IDs|List of interior IDs]] | ||
* [[Dimension]] | |||
[[de:Interior]] | |||
[[Category:Scripting Concepts]] | [[Category:Scripting Concepts]] |
Latest revision as of 21:36, 28 April 2020
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.
You can have up to 255 interiors, interior 0 being the first one and referring to the normal GTA world.
The camera's interior is updated when:
- The local player joins the server (set to 0)
- ResetMapInfo is called (set to 0)
- The local player spawns (set to the player's interior)
- setElementInterior is called
Uses
To allow a player to enter an interior, you should use the setElementInterior 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.
Dimensions
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. Dimensions 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.