JokersBro Posted August 25, 2011 Share Posted August 25, 2011 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
mjau Posted August 25, 2011 Share Posted August 25, 2011 is the problem that the hydra donte deattach or it dont start ? Link to comment
JokersBro Posted September 4, 2011 Author Share Posted September 4, 2011 What should I do? Link to comment
mjau Posted September 4, 2011 Share Posted September 4, 2011 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
JokersBro Posted September 4, 2011 Author Share Posted September 4, 2011 No, no errors but when I got in the Hydra I can not fly away I stay stuck, so to speak Link to comment
Buffalo Posted September 4, 2011 Share Posted September 4, 2011 Did you try kimmis9 code? He has updated it: detachElements ( hydra, lift ) Link to comment
JokersBro Posted September 4, 2011 Author Share Posted September 4, 2011 Although it funzt but when I got the Hydra land falls by the lift and I can not! Link to comment
mjau Posted September 4, 2011 Share Posted September 4, 2011 What ? if it does deatach now i think i know waht your probelm is a hydra underwater cant start to fix this make a command to startthe engine again when you want to start engine use setVehicleEngineState Link to comment
JokersBro Posted September 5, 2011 Author Share Posted September 5, 2011 So I mean this when I say "hydra1" is indeed the lift under water when I got up and then it falls through the elevator and exactly the same thing happens when I land I will fall through the lift Link to comment
mjau Posted September 7, 2011 Share Posted September 7, 2011 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 im not good with cordinates 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