Jump to content

moveObject


GhostXoP

Recommended Posts

[

Does this animate the movement of objects? Does it include collision detection as well? (hitting a wall, and stopping not allowing moveObject to move the object any longer)

Yes. No, the object go through any other objects (maybe except players/peds) and yes.

Just check this Example in wiki.

  
someGuy = getPlayerFromName ( "GhostXoP" ) 
-- If a player called GhostXoP was found then 
if ( someGuy ) then 
    -- Get the player's position 
    x, y, z = getElementPosition ( someGuy ) 
    -- Create a bed (1700) object near to the player 
    bed = createObject ( 1700, x + 5, y, z ) 
    -- Move the bed towards the player over 3 seconds (3000 milliseconds) 
    moveObject ( bed, 3000, x, y, z ) 
    -- Tell the player in the chat box 
    outputChatBox ( "Moving a bed towards you!", someGuy ) 
else 
    -- Tell everyone that a player called 'GhostXoP' could not be found 
    outputChatBox ( "Player GhostXoP doesn't exist" ) 
end 
  

Just test the script for better understanding. :)

Link to comment

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...