Licencia desde 75 €
DE EN FR ES IT CZ

Script for cursor position

Este debate tiene algunos años. Algunos detalles pueden referirse a una versión anterior de Visionaire Studio. Tutoriales actuales

  1. · 5 years ago
    Hello!

    I would like to set the cursor to a specific position before each dialog. In my case to the position 640/400. I know that this can be done with setCursorPos({x=640, y=400}).

    However, I don't want to do it every time before each dialog, but write a definition script once, which sets the cursor automatically to this position before each dialog.

    How should the definition script look like? Can anyone help me?

    Any help would be great.



  2. ¿Estás creando un juego?

    La versión gratuita permite hasta 25 escenas por proyecto. Para más escenas y para vender tu juego necesitas una licencia. Los lectores del foro tienen el Indie Bundle con un 15 % de descuento con el código FORUM15: 84,15 € en lugar de 99 €, válido hasta el 31/12/2026.

    Conseguir un 15 % de descuento Pruébalo gratis
  3. · 5 years ago
    As far as I know there is no dialog start event. So you have check in a main loop if there is a dialogbox. For Example:

    local dialogstarted = false
    
    function MainLoop()
      
      if game.Dialog:isEmpty() then --no dialog running
    
        if dialogstarted == true then
          dialogstarted = false
        end
    
      else
    
        if dialogstarted == false then --pretend to set cursor every frame to the position
          setCursorPos({x=640, y=400})
          dialogstarted = true
        end
    
      end
    
    end
    
    registerEventHandler("mainLoop", "MainLoop")
    
  4. · 5 years ago
    As far as I know there is no dialog start event. So you have check in a main loop if there is a dialogbox. For Example:



    Thank you very much. I will try it.

Este tema está cerrado porque nadie ha respondido en más de un año. Puedes hacer tu pregunta en un tema nuevo.

Nuevo tema

¿Eliminar de verdad este mensaje?