Jump to content

FBI Gates


Recommended Posts

Posted

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 ) 

Posted

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.

Posted

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 ) 

Posted

I told you that third argument in createColCircle is the radius. And you should test it, not ask if it will work.

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