Jump to content

[Problem] Hydra Lift


JokersBro

Recommended Posts

Hello community,

I've put together a script (Hydralift).

The lift goes under the water. So I've created an attach script.

I only have the problem that I can not fly with the hydra.

Here is my script:

lift = createObject ( 3115, 1515.3249511719, -2945.1364746094, -60, 0, 0, 0) 
hydra = createVehicle ( 520, 1515.7152099609, -2945.6892089844, -10, 0, 0, 0 ) 
  
function Gate_down () 
moveObject (lift, 3115, 1515.3249511719, -2945.1364746094, 1.7000000476837, 0, 0, 0 ) 
end 
addCommandHandler ("hydra1", Gate_down) 
  
function Gate_Up () 
moveObject (lift, 3115, 1515.3249511719, -2945.1364746094, -60, 0, 0, 0 ) 
end 
addCommandHandler ("hydra2", Gate_Up) 
  
attachElements ( hydra, lift, 0, 0, 2, 0, 0, 0 ) 
  
addEventHandler ( "onVehicleEnter", getRootElement(), 
function ( thePlayer, seat) 
detachElements ( lift, hydra ) 
end 
) 

Can one help me?

Would be very nice

Best regards

JokersBro

Link to comment
  • 2 weeks later...

Do you get any errors in /debugscript 3

lift = createObject ( 3115, 1515.3249511719, -2945.1364746094, -60, 0, 0, 0) 
hydra = createVehicle ( 520, 1515.7152099609, -2945.6892089844, -10, 0, 0, 0 ) 
  
function Gate_down () 
moveObject (lift, 3115, 1515.3249511719, -2945.1364746094, 1.7000000476837, 0, 0, 0 ) 
end 
addCommandHandler ("hydra1", Gate_down) 
  
function Gate_Up () 
moveObject (lift, 3115, 1515.3249511719, -2945.1364746094, -60, 0, 0, 0 ) 
end 
addCommandHandler ("hydra2", Gate_Up) 
  
attachElements ( hydra, lift, 0, 0, 2, 0, 0, 0 ) 
  
addEventHandler ( "onVehicleEnter", getRootElement(), 
function ( thePlayer, seat) 
detachElements ( hydra, lift ) 
end 
) 

Not tested dont know if works

Link to comment

oh i see waht if u put the hydra mabe just some higher in z cordinates and it attach it higher too ?

lift = createObject ( 3115, 1515.3249511719, -2945.1364746094, -60, 0, 0, 0) 
hydra = createVehicle ( 520, 1515.7152099609, -2945.6892089844, -10, 0, 0, 0 ) 
  
function Gate_down () 
moveObject (lift, 3115, 1515.3249511719, -2945.1364746094, 1.7000000476837, 0, 0, 0 ) 
end 
addCommandHandler ("hydra1", Gate_down) 
  
function Gate_Up () 
moveObject (lift, 3115, 1515.3249511719, -2945.1364746094, -60, 0, 0, 0 ) 
end 
addCommandHandler ("hydra2", Gate_Up) 
  
attachElements ( hydra, lift, 0, 0, 3, 0, 0, 0 ) 
  
addEventHandler ( "onVehicleEnter", getRootElement(), 
function ( thePlayer, seat) 
detachElements ( hydra, lift ) 
end 
) 

Just something i came up with may not work xD im not good with cordinates

Link to comment

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