illestiraqi Posted June 11, 2012 Share Posted June 11, 2012 Well I tried changing around a script but didnt work please help fbigate1 = createObject (980, 938.8994140625, -1027.5, 33.700000762939, 0, 0, 0 ) fbicol = createColCircle ( 938.86096191406, -1015.993347168, 34.869926452637, 0 ) function openfbigates(thePlayer) if getElementModel( thePlayer ) == 286 then moveObject (fbigate1, 5000, 938.8994140625, -1027.5, 28.200000762939 ) end end addEventHandler( "onColShapeHit", fbicol, openfbigates ) function closefbigates(thePlayer) if getElementModel( thePlayer ) == 286 then moveObject (fbigate1, 5000, 938.8994140625, -1027.5, 28.200000762939 ) end end addEventHandler( "onColShapeLeave", fbicol, closefbigates ) Link to comment
JR10 Posted June 11, 2012 Share Posted June 11, 2012 Third argument of createColCircle is the radius. Also in closefbigates, in moveObject, you have the same arguments as moveObject in openfbigates. So the gate will never move back. Link to comment
illestiraqi Posted June 11, 2012 Author Share Posted June 11, 2012 what about this, have a look, will it work? fbigate1 = createObject (980, 938.8994140625, -1027.5, 33.700000762939, 0, 0, 0 ) fbicol = createColCircle ( 938.86096191406, -1015.993347168, 34.869926452637, 0 ) function openfbigates(thePlayer) if getElementModel( thePlayer ) == 286 then moveObject (fbigate1, 5000, 938.8994140625, -1027.5, 28.200000762939 ) end end addEventHandler( "onColShapeHit", fbicol, openfbigates ) function closefbigates(thePlayer) if getElementModel( thePlayer ) == 286 then moveObject (fbigate1, 5000, 938.8994140625, -1027.5, 33.700000762939 ) end end addEventHandler( "onColShapeLeave", fbicol, closefbigates ) Link to comment
JR10 Posted June 11, 2012 Share Posted June 11, 2012 I told you that third argument in createColCircle is the radius. And you should test it, not ask if it will work. 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