Jump to content

Gate isnt working....


Recommended Posts

Posted

Dear Community,

I got here a little problem about the gate i just

got it from a resource it creates the gate but the gate isnt moving....

Help please

   a51gate1 = createObject ( 6959, 2607.5, -4128.2998046875, 18.700000762939, 0, 0, 0 ) 
   a51col = createColCircle ( 2607.6000976563, -4128.7998046875, 18.200000762939, 43 ) 
  
function opena51gates(thePlayer) 
       moveObject (a51gate1, 5000, 2607.5, -4128.2998046875, 42.599998474121 ) 
       end 
addEventHandler( "onColShapeHit", a51col, opena51gates ) 
  
function closea51gates(thePlayer) 
       moveObject (a51gate1, 5000, 2607.5, -4128.2998046875, 18.700000762939 ) 
       end 
addEventHandler( "onColShapeLeave", a51col, closea51gates ) 

Posted

Try this:

  
   a51gate1 = createObject ( 6959, 2607.5, -4128.2998046875, 18.700000762939, 0, 0, 0 ) 
   a51col = createColCircle ( 2607.6000976563, -4128.7998046875, 43 ) 
  
function opena51gates(thePlayer) 
       moveObject (a51gate1, 5000, 2607.5, -4128.2998046875, 42.599998474121 ) 
       end 
addEventHandler( "onColShapeHit", a51col, opena51gates ) 
  
function closea51gates(thePlayer) 
       moveObject (a51gate1, 5000, 2607.5, -4128.2998046875, 18.700000762939 ) 
       end 
addEventHandler( "onColShapeLeave", a51col, closea51gates ) 

When I see this code I agree with TAPL there's 1 Argument to much.

You don't need a Z coordinate in that Function.

    fX: The collision circle's center point's X axis position 
    fY: The collision circle's center point's Y axis position 
    radius The radius of the collision circle  

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

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