al19ja Posted July 25, 2010 Share Posted July 25, 2010 I got a problem with this script, i don´t know why it isn´t working function openSecretDoor(player, commandName, pw) if(pw == "1998") then createObject ( 20, -1530.2584228516, 482.34985351563, 9.657434463501, 0, 0, 0 ) moveObject ( Oelement, 20, -1539.044921875, 482.09069824219, 9.657434463501 ) moveObject ( 40, -1530.2584228516, 482.34985351563, 9.657434463501, ) end end addCommandHandler ( "opendoor", openSecretDoor ) plese help me Link to comment
MaddDogg Posted July 25, 2010 Share Posted July 25, 2010 Please use [lua][/lua] tags. You create an object and then move another object? is this meant to be like that? Otherwise you don't save the object element of your created object in 'Oelement'. Also, you set the move time to 20ms. That's probably unwanted, since the movement would be so quick, it would look like a "teleport". And there is a comma at the end of the argument list of the second moveObject. You should really reread your code, when it is not working. That's so easy to spot. 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