JeViCo Posted July 7, 2018 Posted July 7, 2018 Hello everyone! How can i make ElementData different in all dimensions? For example i want to make marker with ElementData attached to it for each dimension
itHyperoX Posted July 7, 2018 Posted July 7, 2018 onMarkerHit parameters: Parameters element hitElement, bool matchingDimension
Moderators IIYAMA Posted July 7, 2018 Moderators Posted July 7, 2018 Element data isn't bound to dimensions, unless you control it clientside without sync it. A better solution would be: setElementData(element, "key" .. "_dimension:" .. dimension, value) setElementData(element, "key" .. "_dim:" .. dimension, value) Or: local markerContainer = createElement("markerContainer") local marker1 = createMaker(...) setElementDimension(marker1, 0) setElementParent(marker1, markerContainer) setElementData(marker1, "key", "345456") local marker2 = createMaker(...) setElementDimension(marker2, 1) setElementParent(marker2, markerContainer) setElementData(marker2, "key", "cgghgj") ------------------------------------------------------------------------- addEventHandler("onMarkerHit", markerContainer, function (hitElement, matchingDimension) if matchingDimension then end end)
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