launemax Posted October 26, 2014 Share Posted October 26, 2014 Hy there! Is there a way to set an element be visible in all dimensions? For instance an object in a house interior. I use this interior with different dimensions, so I can use it for more than one player's flat. I mapped in this interior some additional objects, but they are only visible in dimension one. Can anybody help me? Thanks Link to comment
Saml1er Posted October 26, 2014 Share Posted October 26, 2014 No, you have to create it then that dimension. Link to comment
Anubhav Posted October 26, 2014 Share Posted October 26, 2014 Just set its dimension different when player enters Link to comment
Moderators Citizen Posted October 27, 2014 Moderators Share Posted October 27, 2014 Just set its dimension different when player enters ... he wants objects to be visible in multiple dimensions ... not an object following one player's dimension ... @launemax: as Saml1er you need to duplicate those objects and set a new dimension on them (I guess you should make a function to load your mapping and duplicate everything with a different dimension) Link to comment
rtx Posted October 27, 2014 Share Posted October 27, 2014 You could create the objects client-side and then set their dimension to the local player's (client-side). Link to comment
launemax Posted October 27, 2014 Author Share Posted October 27, 2014 hm, okay. I got it. I'll try TiM3's solution first and if this isnt efficient, i will duplicate the objects for every dimension. Thanks for your help! Link to comment
joaosilva099 Posted October 27, 2014 Share Posted October 27, 2014 dim = 0 setTimer( function () obj = createObject(...) setElementDimension(obj, dim) dim = dim + 1 end, 1, 65535) Try that... Link to comment
Anubhav Posted October 27, 2014 Share Posted October 27, 2014 That won't work. 2nd argument is time and should be above 50 ms. dim = 0 setTimer( function () obj = createObject(...) setElementDimension(obj, dim) dim = dim + 1 end, 50, 65535) Link to comment
Saml1er Posted October 28, 2014 Share Posted October 28, 2014 Creating more objects will use more ram.... So it will be better to create those objects client side and set their dimension to player's dimension. _dim = setElementDimension function setElementDimension (elem,d) if elem and d and getElementType (elem ) == 'player' then for _, v in ipairs ( getElementsByType("object") ) do _dim (v,d) end return _dim(elem,d) end end All you need to do is to put this code in your resource where you are changing player dimension. If you are doing this in freeroam resource then you must put this code in freeroam resource. EDIT: This is TiM3's solution. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now