karlis Posted April 18, 2010 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
Callum Posted April 18, 2010 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.
Callum Posted April 18, 2010 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
karlis Posted April 19, 2010 Author 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
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