Pinda Posted May 20, 2010 Share Posted May 20, 2010 function resource_starts () object1 = createObject ( 4729, 463.294220 -1991.257324 6.617176 ) move1_1 () end addEventHandler ( "onResourceStart", getResourceRootElement(), resource_starts ) function move1_1 () moveObject ( object1, 5000, 463.294220 -1991.257324 10.267131 ) setTimer ( move1_2, 10000, 1 ) end function move1_2 () moveObject ( object1, 5000, 463.294220 -1991.257324 6.617176 ) setTimer ( move1_1, 10000, 1 ) end /debugscript 3 sais : kutbord.lua:2: ')'expected near '6.617176 but i already have ) near 6.617176 ? Link to comment
kevin11 Posted May 20, 2010 Share Posted May 20, 2010 in 2-8-13 try do this x,y,z (comma's) not x y z (here no comma's) THIS ONE SHOULD WORK (didnt test) function resource_starts () object1 = createObject ( 4729, 463.294220, -1991.257324, 6.617176 ) move1_1 () end addEventHandler ( "onResourceStart", getResourceRootElement(), resource_starts ) function move1_1 () moveObject ( object1, 5000, 463.294220, -1991.257324, 10.267131 ) setTimer ( move1_2, 10000, 1 ) end function move1_2 () moveObject ( object1, 5000, 463.294220, -1991.257324, 6.617176 ) setTimer ( move1_1, 10000, 1 ) end Link to comment
Pinda Posted May 20, 2010 Author Share Posted May 20, 2010 (edited) it works, but i have problems with the rotation cordinats:( should i get it from the .map file ? i now have 4729, 463.294220, -1991.257324, 6.6171760, 0, 0, 110.007896665118 the map file give other cordinates then ineditor <object posX="479.228333" posY="-1991.240234" posZ="6.620041" rotX="0" rotY="0" rotZ="110.007896665118" model="4729" id="object6" /> Edited May 20, 2010 by Guest Link to comment
kevin11 Posted May 20, 2010 Share Posted May 20, 2010 well ur coordinates are the same? change moveobject coordinates to what direction you want it to go example x, y, 0 x, y ,-5 (now it goes into the ground) my answer might not be correct but take a look at youre coordinates, youre problem is there Link to comment
Pinda Posted May 20, 2010 Author Share Posted May 20, 2010 i dont want it to rotate, i want it in a certain position Link to comment
kevin11 Posted May 20, 2010 Share Posted May 20, 2010 i dont want it to rotate, i want it in a certain position ik snap je niet zeg ff in nl Link to comment
Pinda Posted May 20, 2010 Author Share Posted May 20, 2010 zoals ik de cordinaten nu heb, gaat hij rondjes draaien, maar dat wil ik helemaal niet en ik snap het ook niet want in moveObject zijn de rotatecordinaten het zelfde als in createObject Link to comment
kevin11 Posted May 20, 2010 Share Posted May 20, 2010 (edited) aaaah i see Edited May 20, 2010 by Guest Link to comment
Pinda Posted May 20, 2010 Author Share Posted May 20, 2010 ja hij gaat omhoog en omlaag zoals het hoord maar hij draaid rondjes en dat hoord niet Link to comment
kevin11 Posted May 20, 2010 Share Posted May 20, 2010 sorry cant help u its weird cuz only the going up and down coordinates are edited Link to comment
Pinda Posted May 20, 2010 Author Share Posted May 20, 2010 yes i know its weird and if i use the cordinates ingame it dont rotates but it is in a wrong position, if you want i can make a screen Link to comment
kevin11 Posted May 20, 2010 Share Posted May 20, 2010 no lol i just tested in my server:S i saw it go up down left i dont know how thats possible with those coordinates Link to comment
Pinda Posted May 20, 2010 Author Share Posted May 20, 2010 maybe i need to write out the lines (0.000000) 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