Jump to content

[Solved] MTA's Dimension and Interior Systems


-------

Recommended Posts

Hi everybody! So I just started scripting in MTA and I'm a beginner/noob. Recently I came across the dimension and the interior system and I'm a little bit confused on what they are, what's the difference between them and how elements interact with each other across dimensions/interiors.Yes I have already read the wiki pages and done some testing but it didn't really explained much.

How I tested:

1)Created a marker in dimension 0 interior 0 and attached the "onMarkerHit" event to it.

2)Created a pickup in dimension 0 interior 0 and attached the "onPickupHit" event to it.

3)Created a vehicle in dimension 0 interior 1.

4)Played with them my results are mentioned below.

So my questions are:

1) What is an Interior and how it works?

For example if I change players element interior (or any other type of element) and set him let's say the first interior what happens to the player element? Is the element moved to a whole separate kinda "world",(apart from the rest of the elements) that has different interiors or he stays in the same place with the same elements just the "old" textures are unloaded (including the rest of the elements) and the interiors textures get loaded ?

2) Are elements in one interior able to interact with other elements in another interior?

For example if the player was in the default interior (the 0 one) and a vehicle in the 1 one will they be able to interact?

So in my testing when the player was in the 0 interior I could see and trigger the pickup and the marker's events and I was able to push, enter, drive the vehicle (though I couldn't see the texture of the vehicle) then I moved the player to the interior 1 (but I didn't teleport him to an actual interior he stayed at the same position as he was) and the textures of pretty much "everything" were gone.I couldn't neither see the pickup nor trigger its event, I could see the marker but I couldn't trigger its event and the vehicle textures appeared.

3) Why the wiki says you can have up to 255 interiors when on the interior ids list page are listed only 18 ids?

The other 237 ids are reserved for custom interiors I suppose?

4) What is a dimension and how it works?

Does the element get moved into a whole separate "world" when you change its dimension or do they remain in the same "place" just the other elements textures get unloaded?

5) Are elements able to interact with each other across dimensions?

In my testing I couldn't see the marker but I could trigger its event, I neither could see the pickup nor trigger its event or interact with it, same situation with the vehicle.

6) Are elements able to interact with each other across dimensions and interiors?

Probably not just asking to make sure...

7) The overall structure?

Like Is it 255 interior ids per dimension or 65535 dimensions per interior id or are they completely separate from each other?

8)When you create elements (vehicles/pickups/markers) what's their default dimension/interior?

I suppose dimension 0 interior 0 just asking to make sure...

I would like somebody that has some free time and wanna help a beginner to reply me explaining with his words from scratch these two systems covering my questions because there isn't much information about them on the wiki and I couldn't find it elsewhere...

Also sorry for the long post and for the bad English. I tried to be as descriptive as possible ...

Edited by Guest
Link to comment

I don't have much time right now, so I'll take it really quickly and simply respond your questions without reasoning, etc..

1) Interiors are separate worlds.

2) No.

3) Because 255 is limit of interior worlds, but that 18 ids are first 18 interior worlds, which were used for singleplayer interiors, others are empty.

4) It's also separate world, but it works differently, if you are for example in interior 0 (normal SA map) and dimension 5 you'll still see native GTA objects as they are, but you'll not meet other players, that are in different dimension

5) No.

6) No.

7) It's 65535 dimensions per all interior worlds.

8) It's 0 and 0 of course (normal SA map).

For next time: Try to experiment yourself, that's best way to teach everything.

EDIT: Btw.. you mentioned onMarkerHit event, take a look at wiki page, it has matchingDimension variable, which you can use to detect that source element is in same dimension as marker.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...