Zalmon Posted July 11, 2011 Share Posted July 11, 2011 How do i make all 3 of these markers go to the specified interior/dimension? I put them in a table, and I don't want them in the same spot. Here is my current script, but the markers wont show up posis = {{362.502,150.813,1025.78},{353.758,193.991,1019.98},{351.345,164.059,1019.98}} function setDimensions() if ( getElementDimension ( posis ) == 0 ) then setElementDimension (posis , 1 ) setElementInterior (posis , 3) end end addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), setDimensions ) Link to comment
Castillo Posted July 11, 2011 Share Posted July 11, 2011 posis is a table, you are using it like a element... posis = {{362.502, 150.813, 1025.78, 1, 3}, {353.758, 193.991, 1019.98, 1, 3}, {351.345, 164.059, 1019.98, 1, 3}} function setDimensions() for i,v in pairs(posis) do local marker = createMarker(v[1], v[2], v[3], "cylinder", 2, 255, 0, 0, 255) setElementDimension (marker , v[4] ) setElementInterior (marker , v[5]) end end addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), setDimensions ) Try that. Link to comment
Zalmon Posted July 11, 2011 Author Share Posted July 11, 2011 Everytime you reply to my scripting topics you make me feel stupid P.S thats sort of a compliment towards you :) 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