Dreft Posted April 28, 2010 Posted April 28, 2010 How to create element(marker,object etc.) which will be shown in all possible dimensions ?
Jason_Gregory Posted April 28, 2010 Posted April 28, 2010 Well, thats not smart cause it exists 65535 dimensions, but heres your example. https://wiki.multitheftauto.com/wiki/Dimension local object = createObject(blablablabla [...]) for dimensionKey, 65535 do setElementDimension (object, dimensionKey ) end
Dreft Posted April 28, 2010 Author Posted April 28, 2010 Well, thats not smart cause it exists 65535 dimensions, but heres your example.https://wiki.multitheftauto.com/wiki/Dimension local object = createObject(blablablabla [...]) for dimensionKey, 65535 do setElementDimension (object, dimensionKey ) end This doesn't work. This loops set dimension to: object = 1 then object = 2, not 1. After that object = 3, not 2 And at the end object = 65534, so if I won't be in 65534 dimension, i won't see it.
Jason_Gregory Posted April 28, 2010 Posted April 28, 2010 Ah now i know what you exactly mean btw. dimensionKey was the startvalue, it should be starting with 1 or 0. I cant find a function for this right now, but it should be possible if you create the Element/Object in every Dimension Startdimensions = 0 for dimensionKey = Startdimensions, 65535 do object = createObject(blablablabla [...]) setElementDimension (object, dimensionKey ) end And this Loop does not stop at 65535. For what do you need a Element for all dimensions ? Sounds stupid for meh
dzek (varez) Posted April 28, 2010 Posted April 28, 2010 your server is that big that you use 65k dimensions? hope you have like .. 650k players online, (10 per dimension)
Jason_Gregory Posted April 28, 2010 Posted April 28, 2010 your server is that big that you use 65k dimensions? hope you have like .. 650k players online, (10 per dimension) I wana see his CPU while creating Maps for all 65k dimensions My Console needs ~30 Seconds for printing all Dimensions on a Quad Core Q8300 / 4 GB
Dreft Posted April 28, 2010 Author Posted April 28, 2010 No I'm not making it for 65k dimensions.. I just asked "for all possible" because I thought that there is some way without adding element > setting dimension > adding another element > setting dimension and so on. Thx for help.
DiSaMe Posted April 29, 2010 Posted April 29, 2010 Server: object = createObject(...) setElementID(object,"alldim") Client: object = getElementByID("alldim") addEventHandler("onClientRender",getRootElement(), function() setElementDimension(object,getElementDimension(getLocalPlayer())) end ) If you want to make this work with multiple objects, you can create an abstract element and make it a parent of objects.
dzek (varez) Posted April 29, 2010 Posted April 29, 2010 Doomed_Space_Marine 's idea is very good one
karlis Posted April 29, 2010 Posted April 29, 2010 you will need adjust it with https://wiki.multitheftauto.com/wiki/SetElementSyncer from 1.0.4 upwards for sync issues fixing
DiSaMe Posted April 29, 2010 Posted April 29, 2010 you will need adjust it withhttps://wiki.multitheftauto.com/wiki/SetElementSyncer from 1.0.4 upwards for sync issues fixing Is that needed? Do object elements have syncers at all? As far as I know, setting dimension of server-side object in a client-side script only changes the dimension locally.
karlis Posted April 29, 2010 Posted April 29, 2010 im not sure, but i kinda remember dynamic objs synced.or im wrong?
Maccer. Posted April 29, 2010 Posted April 29, 2010 im not sure, but i kinda remember dynamic objs synced.or im wrong? No, they aren't.
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