DrifteR Posted November 7, 2010 Posted November 7, 2010 hi again, i have the code created with Omg project and i modified it a little bit , but it doesn't work SERVER Side -- DDC OMG generated script: function omgInit() light1 = createMarker(-2270.2705078125,2340.3305664063,9.8359212875366,"checkpoint",2,255,0,250,150) omgMovelight1(1) end function omgMovelight1(point) if point == 1 then moveObject(light1,5000,-2270.0649414063,2287.4482421875,9.8359212875366,0,0,0) setTimer(omgMovelight1,5000 + 0, 1, 2) elseif point == 2 then moveObject(light1,5000,-2255.2316894531,2286.6237792969,9.8359212875366,0,0,0) setTimer(omgMovelight1,5000 + 0, 1, 3) elseif point == 3 then moveObject(light1,5000,-2254.3627929688,2336.8427734375,9.8359212875366,0,0,0) setTimer(omgMovelight1,5000 + 0, 1, 4) elseif point == 4 then moveObject(light1,5000,-2270.2705078125,2340.3305664063,9.8359212875366,0,0,0) setTimer(omgMovelight1,5000 + 0, 1, 1) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), omgInit) please help
dzek (varez) Posted November 7, 2010 Posted November 7, 2010 what have you modified? are you getting errors? was generated one working?
DrifteR Posted November 7, 2010 Author Posted November 7, 2010 the code worked with an object, but when i converted to work with a marker, it creates the marker but it doesn't move it
dzek (varez) Posted November 7, 2010 Posted November 7, 2010 oh right. marker is not an object. moveObject not moveElement. You can make small object, set its alpha to 0, attach marker to element, then move that object. edit: but i'm worried that marker events may be not working propely after doing this
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