Wei Posted March 25, 2012 Share Posted March 25, 2012 When i come to the gate they doesn't open! gate1 = createObject ( 987, 175.19999694824, 1094.9000244141, 16, 0, 0, 90 ) col = createColCircle ( 987, 175.19999694824, 1094.9000244141, 10 ) peder = createBlip ( 987, 175.19999694824, 1094.9000244141, 43 ) function opengates(thePlayer) if getElementModel( thePlayer ) == 217 then moveObject (gate1, 5000, 180.19999694824, 1094.9000244141, 16 ) end end addEventHandler( "onColShapeHit", col, opengates ) function closegates(thePlayer) if getElementModel( thePlayer ) == 217 then moveObject (gate1, 5000, 175.19999694824, 1094.9000244141, 16 ) end end addEventHandler( "onColShapeLeave", col, closegates ) Link to comment
Castillo Posted March 25, 2012 Share Posted March 25, 2012 Check the colshape position, it mayn't be the position you think it is. Link to comment
Wei Posted March 25, 2012 Author Share Posted March 25, 2012 Check the colshape position, it mayn't be the position you think it is. how can i know the colshape position ? isn't that circle around the position that i chosed ? Link to comment
Castillo Posted March 25, 2012 Share Posted March 25, 2012 Use: setDevelopmentMode to enable the command /showcol, this way you can see the colshape. Link to comment
SMART:> Posted March 25, 2012 Share Posted March 25, 2012 gate1 = createObject ( 987, 959, 198, 35, 0, 0, 90 ) --change col = createColSphere (959, 198, 35, 10 ) --change pos peder = createBlip ( 987, 175.19999694824, 1094.9000244141, 43 ) function opengates(thePlayer) local id = getElementModel ( thePlayer ) if id == 217 then moveObject (gate1, 959, 198, 35, 16 ) --change end end addEventHandler( "onColShapeHit", col, opengates ) function closegates(thePlayer) if id == 217 then moveObject (gate1, 959, 198, 35, 16 ) --change end end addEventHandler( "onColShapeLeave", col, closegates ) Link to comment
Wei Posted March 25, 2012 Author Share Posted March 25, 2012 Use: setDevelopmentMode to enable the command /showcol, this way you can see the colshape. Is there anyway to calculate col ? Link to comment
Spajk Posted March 26, 2012 Share Posted March 26, 2012 change col obj size to something smaller col = createColSphere (959, 198, 35, 10 ) --change pos => col = createColSphere (959, 198, 35, 1.5 ) --change pos Link to comment
Wei Posted March 26, 2012 Author Share Posted March 26, 2012 change col obj size to something smaller col = createColSphere (959, 198, 35, 10 ) --change pos => col = createColSphere (959, 198, 35, 1.5 ) --change pos I've downloaded the coleeditor from the community. https://community.multitheftauto.com/index.php?p= ... ls&id=3804 It's much easyer way. Thanks anyway! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now