Jump to content

Ayuda con puerta en movimiento


eldelahoz

Recommended Posts

Hola lo que pasa es que estaba viendo es te scripting lo use y no me funciona y como puedo hacer para que solamente le abra la puerta automáticamente a los del clan

theObject = createObject ( 980, 439.10000610352, 945.5, 3.9000000953674) 
x,y,z = getElemntPosition (theObject) 
Zona = createColRectangle ( x,y, 10, 10) 
function funcion () 
moveObject ( theObject, 10000, 430.29998779297, 937.29998779297, -1.9000000953674 ) 
end 
addEventHandler ( "onColShapeHit", Zona, funcion ) 
  
  
function funcion2 () 
moveObject ( theObject, 10000, 430.29998779297, 937.29998779297, 3.9000000953674 ) 
end 
addEventHandler ( "onColShapeLeave", Zona, funcion2 ) 

¡Saludos!

Link to comment

Miren ya lo e cambiado pero sigue sin funcionar

theObject = createObject ( 980, 439.10000610352, 945.5, 3.9000000953674) 
x,y,z = getElementPosition (theObject) 
Zona = createColRectangle ( x,y, 10, 10) 
function funcion () 
if z == 3.9000000953674 then 
moveObject ( theObject, 10000, 430.29998779297, 937.29998779297, -1.9000000953674 ) 
elseif z == -1.9000000953674 then 
moveObject ( theObject, 10000, 430.29998779297, 937.29998779297, 3.9000000953674 ) 
end 
end 
addEventHandler ( "onColShapeHit", Zona, funcion ) 

Arreglen lo o diganme que esta mal por favor

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...