Jump to content

[Question] About moveObject


Backsage

Recommended Posts

Posted

Hi. I have seen on some server where the marker can move up and down and I wanted to see if I can achieve the same effect. I used runcode. I've tried creating a marker and then tried to move it with moveObject, but it doesn't work. It always return false. So does moveObject only work with objects and not other elements like markers and players? If so, what can I do to make that marker move?

Posted
Hi. I have seen on some server where the marker can move up and down and I wanted to see if I can achieve the same effect. I used runcode. I've tried creating a marker and then tried to move it with moveObject, but it doesn't work. It always return false. So does moveObject only work with objects and not other elements like markers and players? If so, what can I do to make that marker move?

You could try attaching the marker to a object, and moving the object will make the marker move to :P

  
local marker = createMarker ( 0, 0, 0, "arrow", .75, 255, 0, 0, 170 ) 
local object = createObject(1318, x, y, z, rx, ry, rz) 
  
function moveObject() 
if attachElements ( marker, object, 0, 0, 2 ) then 
moveObject(object, time, x, y, z, rx, ry, rz) 
end 
end 
  

Posted
You can use
  
attachElementToElement 
  

Or do you mean that you want to move the marker only without any object?

Yes, I wanted to move the marker only. But I guess I have to use attachElements first. And I've tested it and it works. Thanks guys.

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