Jump to content

[HELP] vehicle walking alone?


#RooTs

Recommended Posts

Here's an example (Untested)

--

  
Table = {{x,y,z,r,1},{x,y,z,r,2},{x,y,z,r,3},{x,y,z,r,4}} -- 1,2,3,4,5 etc = position ; x,y,z,r = cords for said position 
  
Time = 5000 -- Put time you want it to take for each position here.  Basically the speed. 
Object = -- Put car here. 
function trigger() 
for i,v in pairs(Table) do 
local x,y,z,r,p = Table[1],Table[2],Table[3],Table[4],Table[5] 
setTimer ( moveTheObject, p*time, 1,x,y,z,r,p) -- Set timer for when to move it.. 
end 
end 
  
function moveTheObject(x,y,z,r,p) 
local xr,yr,zr = getElementRotation(Object) 
moveObject (Object, Time,x,y,z,xr,yr,r) --- Actually do the move 
end 
  

Link to comment

Lets do some magic.

objectMagic = createObject(...) -- create an object 
     vehicleMagic = createVehicle(...) -- create vehicle to later attach with 
    setElementAlpha(objectMagic, 0) -- magic starts 
    attachElements ( vehicleMagic, objectMagic) -- yes make it stick to the object 
    moveObject (objectMagic, ...) --  the magic happens 

Walah

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