Jump to content

Moving objects


Recommended Posts

Posted

BUMP

I also want to know that :)

If please someone can take the time, I know how to add a lua script, but giving an example script with a bit of information would be pleased :mrgreen:

Posted

So I only have to include a script in the .zip

So Questions:

How is it called when my map is called i.e. "race-LukkieMap"

How would the script be when I have 2 objects to rotate?

I only have to enter

bool moveObject ( object theObject, int time, float targetx, float targety, float targetz)

and make it to

bool moveObject ( object <object name>, int 2000, float 500, float 800, float 70)

or simply

moveObject (<object name>, 2000, 500, 800, 70)

and nothing above or under it?

And does it return automatically?

Too many questions I know but I really want to know it :D

Posted

last one

you have to create object via script, or at least get your object from the game, which probably be harder to do for you..

and if you need object moving more than once, you need few lines of script, not just once..

search, there was another topic like that few days ago

Posted (edited)

I guess this will work

Only I still need an interval to make a life return.

Objectname123 = createObject(3458, -2464.9296875, 1522.9167480459, 6.1990437507629)
moveObject(Objectname123, 4000, -2464.9296875, 1522.9167480469, 27.570457458496) 
end

Edited by Guest
Posted

Is this the right code?

function ClientStarted ()
setSkyGradient( 255, 0, 0, 255, 0, 0)
end
 
function ObjectsRotateStart ()
moveObject(rotate1, 10000, -4475.867188, -2251.131836, 494.547363, 0, 180, 0)
moveObject(rotate2, 10000, -4475.867188, -2251.131836, 494.547363, 0, 180, 0)
end
 
setTimer(ObjectsRotateStart, 10000, 0)
 
 
addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), ClientStarted )
addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), ObjectsRotateStart )

2 objects with the id rotate1 and rotate2 will be rotating 360 degrees in 20 seconds; right?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...