[DooD]Heavyair Posted May 27, 2008 Share Posted May 27, 2008 i am trying to make a plane crash on easter bay bridge this is what i have so far function planecrash ( player ) outputChatBox ( "!!!!LOOK OUT BELOW!!!!" ) local plane = createObject( 1681, -1740.3088378906, 411.09747314453, 109.56239318848, 0, 0, 0 ) local smokin = createObject ( 2780, -1740, 411, 109 ) local smokin2 = createObject ( 2780, -1738, 411, 109 ) attachElementToElement ( smokin, plane, -1.5, -4, 0 ) attachElementToElement ( smokin2, plane, 1.5, -4, 0 ) setTimer ( moveObject, 1000, 1, plane, 10000, -1699.7166748047, 502.56951904297, 84.887832641602, -4.5, -11.5, -34 ) setTimer ( moveObject, 11010, 1, plane, 10000, -1527.2728271484, 689.72906494141, 58.848167419434, -5, 11.5, -10.5 ) setTimer ( moveObject, 21020, 1, plane, 10000, -1444.8721923828, 774.34039306641, 50.639617919922, 9.5, -16, 9 ) setTimer ( moveObject, 31030, 1, plane, 10000, -1381.8197021484, 860.57458496094, 53.381561279297, 7.5, 41.5, -10 ) setTimer ( moveObject, 41040, 1, plane, 10000, -1285.4609375, 943.88037109375, 47.282379150391, -3, -21, -4.5 ) setTimer ( moveObject, 51050, 1, plane, 10000, -1223.9165039063, 1008.3391113281, 44.425498962402, -2.5, -4.5, 13.5 ) setTimer ( createExplosion, 62000, 1, -1223, 1008, 44, 4 ) setTimer ( destroyElement, 62000, 1, plane ) setTimer ( destroyElement, 62000, 1, smokin ) setTimer ( destroyElement, 62000, 1, smokin2 ) end plane flys down to bridge trys to land and then blows up the two SMOKIN/SMOKIN2 objects are to make smoke come out of engines what i want to do is use ( setObjectScale ) on the two smoke machines so u cant see them and i also want to use ( setElementCollisionsEnabled ) on the PLANE so it will smash down lampposts on the bridge as it trys to land script is working fine as is but i think i could make it better with these thanx for any ideas Link to comment
eAi Posted May 28, 2008 Share Posted May 28, 2008 Sounds fun, but what's the problem? Link to comment
[DooD]Heavyair Posted May 28, 2008 Author Share Posted May 28, 2008 problem is when i try to use ( setObjectScale ) on the fog machines ID 2780 i get an error cant seem to find exact error in server log for this one and when i try to ( setCollisionsEnabled ) true on the plane ID 1681 i also get an error : attempt to call global 'setCollisionsEnabled' (a nil value) Link to comment
eAi Posted May 28, 2008 Share Posted May 28, 2008 Well, it's not called setCollisionsEnabled is it - setElementCollisionsEnabled - that's why it's saying it can't find it. You're not going to find any errors about setObjectScale in the server as it's a client-side only function. Find the exact error (using debugscript) and we'll see what the problem is Link to comment
[DooD]Heavyair Posted May 28, 2008 Author Share Posted May 28, 2008 thanx eai ive got to pay more attention to what im typing with the objectScale being client side i dont think ill worry to much about it as im not very good at scripting and im not to sure how to do stuff client side ( not to important anyway for the time being ) i will test the collisions thing now THANX AGAIN EDIT :: OK tried putting setElementCollisionsEnabled ( plane, true ) and i get this : attempt to call global 'setElementCollisionsEnabled' (a nil value) looking at the wiki im pretty sure im writing it wrong but im not sure how to do it Link to comment
50p Posted May 28, 2008 Share Posted May 28, 2008 thanx eaiive got to pay more attention to what im typing with the objectScale being client side i dont think ill worry to much about it as im not very good at scripting and im not to sure how to do stuff client side ( not to important anyway for the time being ) i will test the collisions thing now THANX AGAIN EDIT :: OK tried putting setElementCollisionsEnabled ( plane, true ) and i get this : attempt to call global 'setElementCollisionsEnabled' (a nil value) looking at the wiki im pretty sure im writing it wrong but im not sure how to do it setElementCollisionsEnabled is also client-side function. Link to comment
[DooD]Heavyair Posted May 28, 2008 Author Share Posted May 28, 2008 that will be my problem then i havent really tried client side functions very much guess its time to learn EH THANX for the replys eai and 50p ( gotta say i love that name 50p ) EDIT ::: when i run the script above if im not standing fairly close to where it is created the plane never appears. the script gives no errors and if i make sure to be close to where the plane is created i can see it fine. does this mean i should try to run this sort of thing as a client side script so that it is synchronized properly or is this due to something else. if i do need to run it as a client side function is it just a case of setting the script to client in the meta or do i need a server side script as well Thanx for any advice as i am trying to use moveObject and createObject like this quite a lot but this is the first time ive had this problem. 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