Saltar al contenido
  • Global

    Global

    Chatroom Rules

    • NO SE DA SOPORTE EN CHATBOX
    • NO SPAM
    • NO FLOOD

Publicaciones recomendadas

  • Usuario
Publicado

Hola, queria pedir ayuda con un script que no me funciono es sobre unas puertas automaticas las cuales se abren en cuanto un player pasa en frente de ellas

 

objeto1 = createObject ( 2929, 211.8, 1875, 14, 0, 0, 0 )
objeto2 = createObject ( 2929, 215.9, 1875, 14, 0, 0, 0)
x,y,z = getElementPosition ( objecto1, objeto2 )
zona = createColRectangle ( x,y, 10, 10, 10 )

function funcion1()
moveObject ( objeto1, 2000, 208, 1875, 14 )
moveObject ( objeto2, 2000, 219.8, 1875, 14 )
end
addEventHandler ( "onColShapeHit", zona, funcion1 )

function funcion2()
moveObject ( objeto1, 2000, 211.8, 1875, 14 )
moveObject ( objeto2, 2000, 215.9, 1875, 14 )
end
addEventHandler ( "onColShapeLeave", zona, funcion2 ) 

 

 

El codigo no me funciono con el "createColRectangle , createColCircle, createColCuboid" gracias :P

  • Ex-Staff
Publicado

Fijate, pusiste mal esto:

x,y,z = getElementPosition ( objecto1, objeto2 )

escribiste mal el primero argumento: "objecto1", cuando debería ser "objeto1"

x,y,z = getElementPosition ( objeto1, objeto2 )
  • Usuario
Publicado

 

Fijate, pusiste mal esto:

x,y,z = getElementPosition ( objecto1, objeto2 )

escribiste mal el primero argumento: "objecto1", cuando debería ser "objeto1"

x,y,z = getElementPosition ( objeto1, objeto2 )

hahah Si eso me di cuenta ayer despues de que lo publique pero digamos si estaba mal el argumento 1 por que no hubiera servido el 2° argumento :c ?

  • Ex-Staff
Publicado

Al tener un argumento con valor nil la función automáticamente te devuelve false independiente de cuantos argumentos tengas dentro de ella.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Invitado
Responder a este tema...

×   Pegar como texto enriquecido.   Pegar como texto sin formato

  Only 75 emoji are allowed.

×   Tu enlace se ha incrustado automáticamente..   Mostrar como un enlace en su lugar

×   Se ha restaurado el contenido anterior.   Limpiar editor

×   No se pueden pegar imágenes directamente. Carga o inserta imágenes desde la URL.

  • Explorando recientemente   0 miembros

    • No hay usuarios registrados viendo esta página.
×
×
  • Crear nuevo...