karlis Posted April 18, 2010 Share Posted April 18, 2010 (edited) i am a lil confused how to change x y z nodes in map file,setElementData() or setElementPosition() will work? Edited April 19, 2010 by Guest Link to comment
Callum Posted April 18, 2010 Share Posted April 18, 2010 Yea, setElementData should work, maybe somin like; for k, v in ipairs (getElementsByType("elementNode")) do setElementData(v,"x",nil) setElementData(v,"y",nil) setElementData(v,"z",nil) end That is, if the element data is "x", "y", and "z", and you're using a .map file (and of course you want to do it for every one of that element)l. Link to comment
Callum Posted April 18, 2010 Share Posted April 18, 2010 Sorry, forgot to add to previous post; In XML maybe somin like; local file = xmlLoadFile("elements.map") for k, v in ipairs (xmlNodeGetChildren(file)) do xmlNodeSetAttribute(v,"x","") xmlNodeSetAttribute(v,"x","") xmlNodeSetAttribute(v,"x","") xmlSaveFIle(file) xmlUnloadFile(file) end Link to comment
karlis Posted April 19, 2010 Author Share Posted April 19, 2010 ok thnaks, but if someone else wana use this he need know thats it is posX posY posZ, not x y z 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