Jump to content

create.... functions + math.


Jockie

Recommended Posts

function moveBarrel(object)
local x,y,z = getElementPosition(object)
moveObject (object, 45000, x - MOVE_DELTA, y, z)
setTimer(respawnBarrel,45000,1,object)
end
 
function respawnBarrel(object)
destroyElement(object)
  newBarrel = createObject( 1225, 3923.9899902344, math.random(461,351.8), 2.0592248439789, 90,0,0)
setTimer(moveBarrel, 50, 1, newBarrel)
end

And this: http://img28.imageshack.us/img28/6507/createobjectpr.png

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