Hi, i'm new and very noob in all this scripting thing, but I want to learn, at least, basic things.
I tried to create myself a script to open/close a gate, which is the following.
puerta = createObject (971, -2136.599609375, 208.599609375, 38, 0, 0, 270)
function abrirPuerta(player)
moveObject (puerta, 5000, -2136.6000976563, 208.60000610352, 29)
end
addCommandHandler ("james", abrirPuerta)
function cerrarPuerta(player)
moveObject (puerta, 5000, -2136.599609375, 208.599609375, 38)
end
addCommandHandler ("james2", cerrarPuerta)
I know it's very very simple, but it's the best I can do.
The thing is, I want to make that door open and close with the same command. I think I have to use an if, but I'm not sure how to do it.
If someone could help me, I'd appreciate it.[/i]