Jump to content

A Question :)


Quiz

Recommended Posts

Maybe you need this:
setElementCollidableWith 

I know how to use this function, it's for controlling the the status of the collision between the objects and this is not what I want! Try to create two objects and then attach them together you'll see that you can't walk quickly on the object which is attached.

Link to comment
local object = createObject(8838,2490,-1670,13.9) 
local object1 = createObject(8838,2490,-1670,17.9) 
  
addEventHandler( "onClientResourceStart", getRootElement( ), 
function() 
    attachElements (object1,object, 0, 5, 0 ) 
end) 

try to walk quickly on the first object, you'll see that you can. But you can't do the same thing with the second one.

Link to comment

Right now you can do this solution maybe.

local object = createObject(8838, 2490, -1670, 13.9) 
local object1 = createObject(8838, 2490, -1670, 17.9) 
  
addEventHandler("onClientResourceStart", resourceRoot, 
function() 
    attachElements(object1, object, 0, 5, 0) 
    setTimer(detachElements, 200, 1, object1, object) 
end) 

Link to comment
Right now you can do this solution maybe.
local object = createObject(8838, 2490, -1670, 13.9) 
local object1 = createObject(8838, 2490, -1670, 17.9) 
  
addEventHandler("onClientResourceStart", resourceRoot, 
function() 
    attachElements(object1, object, 0, 5, 0) 
    setTimer(detachElements, 200, 1, object1, object) 
end) 

lol, this not a solution because I want to use moveObject on the main object to make both objects moving together.

Another thing I want to mention it, If you attach an object to another (like my code), and then use moveObject to make the main object moving. If you were standing on the second one (the attached one), you would fall to the ground. :lol: You have to stand on the main object if you don't want to fall. Try it and you'll see.

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