Jump to content

How can i set the map to all dimensions of its interior?


M0U

Recommended Posts

Hi,

I want to know how can I set the map to all dimensions of interior 1 for example.

because if I put it in my RP server it will be in a specific dimension like 50 for example and if I create another interior with the command

/addint id type name 

It will be created in a new dimension like 1700 but the map won't appear because it's on a specific dimension that is 50

so how can I make it appear to all dimensions of the interior?

The current code is:
    <object id="object (int2Hoose2) (2)" breakable="true" interior="1" collisions="true" alpha="255" model="14701" doublesided="false" scale="1" dimension="50" posX="1451.3" posY="-34.5" posZ="1002.1" rotX="0" rotY="0" rotZ="0"></object>

I hope you understand.

 

 

Link to comment

I tried it but now it's invisible in all dimensions

the code now:
    <object id="object (int2Hoose2) (2)" breakable="true" interior="1" collisions="true" alpha="255" model="14701" doublesided="false" scale="1" dimension="-1" posX="1451.3" posY="-34.5" posZ="1002.1" rotX="0" rotY="0" rotZ="0"></object>

 

what is the problem here?

Link to comment
1 hour ago, IIYAMA said:

You could also use the setElementDimension function on the map root element. Propagation calls down the element tree should be enabled for that element.

 

https://wiki.multitheftauto.com/wiki/SetElementDimension

https://wiki.multitheftauto.com/wiki/Element_tree

 

 

 

 

 

Is there a predefined variable to specifically set resource root map elements? If I do something like this in my resource:

setElementDimension(resourceRoot, -1)

Wouldn't it also change any other elements' (vehicles created by resource etc.) dimension to -1 as well?

Link to comment
  • Moderators
2 minutes ago, Sorata_Kanda said:

Is there a predefined variable to specifically set resource root map elements? If I do something like this in my resource:


setElementDimension(resourceRoot, -1)

Wouldn't it also change any other elements' (vehicles created by resource etc.) dimension to -1 as well?

Yes that would indeed happen.

 

There is no predefined variable, because each loaded map in a single resource has it's own mapRoot.

See image: (there are two maps on one resourceRoot)

Tre.png

Function to get it:

https://wiki.multitheftauto.com/wiki/GetResourceMapRootElement

You might also be able to get it with: https://wiki.multitheftauto.com/wiki/GetElementChildren
Which only takes the direct children of an element.

 

This will give you the root of all elements created by scripting: (No pre-defined variable for some unknown reason)

https://wiki.multitheftauto.com/wiki/GetResourceDynamicElementRoot

 

 

 

 

  • Like 1
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...