Dimension: Difference between revisions
No edit summary |
Fernando187 (talk | contribs) m (add info about which elemtns can be used in dimension) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Dimensions are a way of separating parts of the game world from each other. Each dimension can contain | 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. | ||
{{DimensionValidElements}} | |||
{{UpdateDimensionInterior}} | |||
==Uses== | ==Uses== | ||
A useful use of this is for [[ | A useful use of this is for unique [[interior]]s. 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. | ||
==Relevant scripting functions== | ==Relevant scripting functions== | ||
Line 13: | Line 17: | ||
[[Category:Scripting Concepts]] | [[Category:Scripting Concepts]] | ||
[[de:Dimension]] |
Latest revision as of 09:43, 14 October 2024
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.
The following Element types can be used in the Dimension system:
- Player
- Ped
- Vehicle
- Object
- Pickup
- Marker
- Collision shape
- Blip
- Radar area
- Team
- Sound
- Weapon
- Light
- Water
- Custom dummy elements (createElement)
The camera's dimension 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 dimension)
- setElementDimension is called
Uses
A useful use of this is for unique interiors. 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.