Wei Posted March 25, 2012 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 )
Castillo Posted March 25, 2012 Posted March 25, 2012 Check the colshape position, it mayn't be the position you think it is.
Wei Posted March 25, 2012 Author 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 ?
Castillo Posted March 25, 2012 Posted March 25, 2012 Use: setDevelopmentMode to enable the command /showcol, this way you can see the colshape.
SMART:> Posted March 25, 2012 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 )
Wei Posted March 25, 2012 Author Posted March 25, 2012 Use: setDevelopmentMode to enable the command /showcol, this way you can see the colshape. Is there anyway to calculate col ?
Spajk Posted March 26, 2012 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
Wei Posted March 26, 2012 Author 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!
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