sel3a Posted October 31, 2014 Share Posted October 31, 2014 hello everyone i'm trying to make a marker that get changed to another color every 1 second or idk anyway random color but i have problem i can't make it i just did when you restart the script the colors will change that's all i can't make automatically So please guys help. The one that i made marker1 = createMarker(566.56482, -1854.94653, 10.31884,"corona",2,0,255,0) marker2 = createMarker(572.39929, -1854.94653, 10.31884,"corona",2,0,255,0) marker3 = createMarker(569.94238, -1876.34033, 7.81884,"corona",2,0,255,0) marker4 = createMarker(569.94238, -1885.66272, 7.81884,"corona",2,0,255,0) marker5 = createMarker(574.48718, -1881.21619, 7.81884,"corona",2,0,255,0) marker6 = createMarker(564.86133, -1881.21619, 7.81884,"corona",2,0,255,0) marker7 = createMarker(564.86133, -1862.84277, 2.98764,"corona",2,0,255,0) marker8 = createMarker(574.36133, -1862.34351, 2.98764,"corona",2,0,255,0) marker9 = createMarker(569.61133, -1856.34351, 2.98764,"corona",2,0,255,0) marker10 = createMarker(573.61133, -1867.71619, 2.98764,"corona",2,0,255,0) marker11 = createMarker(562.86133, -1857.96619, 2.98764,"corona",2,0,255,0) marker12 = createMarker(575.9837, -1857.96619, 2.98764,"corona",2,0,255,0) marker13 = createMarker(578.7334, -1864.4658, 2.98764,"corona",2,0,255,0) marker14 = createMarker(558.7337, -1860.21619, 2.98764,"corona",2,0,255,0) marker15 = createMarker(563.9834, -1864.8437, 10.48764,"corona",2,0,255,0) marker16 = createMarker(574.9837, -1864.84351, 10.48764,"corona",2,0,255,0) marker17 = createMarker(574.9834, -1856.09277, 10.48764,"corona",2,0,255,0) marker18 = createMarker(563.7337, -1856.09351, 10.48764,"corona",2,0,255,0) marker19 = createMarker(569.86823, -1881.03137, 9.91904,"corona",2,0,255,0) marker20 = createMarker(565.74731, -1854.74622, 6.32647,"corona",2,0,255,0) marker21 = createMarker(573.36975, -1854.74622, 6.32647,"corona",2,0,255,0) setMarkerColor(marker1, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker2, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker3, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker4, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker5, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker6, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker7, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker8, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker9, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker10, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker11, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker12, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker13, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker14, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker15, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker16, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker17, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker18, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker19, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker20, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker21, math.random(0,255), math.random(0,255), math.random(0,255), 90) Thnaks For reading. Link to comment
TAPL Posted October 31, 2014 Share Posted October 31, 2014 Use timer: setTimer(function() setMarkerColor(marker1, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker2, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker3, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker4, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker5, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker6, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker7, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker8, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker9, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker10, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker11, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker12, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker13, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker14, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker15, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker16, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker17, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker18, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker19, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker20, math.random(0,255), math.random(0,255), math.random(0,255), 90) setMarkerColor(marker21, math.random(0,255), math.random(0,255), math.random(0,255), 90) end, 1000, 0) Link to comment
sel3a Posted October 31, 2014 Author Share Posted October 31, 2014 OMG really thank you mate that was very helpful.Thanks again 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