License from €75 Log in
DE EN FR ES IT CZ

Mouse Click & Double-Click

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 12 years ago
    Hi,
    I'm getting some strange behaviour with the mouse clicks that I'm hoping you can confirm if it's a bug or something i can work around.

    I have an object with 2 actions (Executed at destination), Single-Click (Look) and Double-Click (Use).

    If I Single-Click (Look) or Double-Click (Use) the object from a distance all works perfectly. (The character walks to the object and the correct action it fired).
    But, If the character has already walked up to the object and looked at it (Character is already stood at the object destination), then the Double-Click (Use) action doesn't get recognised, the Single-Click (Look) action gets called instead.

    It seems that if you Double-Click (Use) the object from a distance, this gives the engine time to fire before the Character reaches the object.
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 12 years ago
    Hi,
    Double Click means a single click happened before, we can't know that a double click is coming, we would need to wait 1s until the action is executed, that would be shit.
  4. · 12 years ago
    Surely the single click shouldn't fire if you've double clicked.
  5. · 12 years ago
    A double-click should also happen in under 500ms, maybe even 350ms. Preferably it could be adjustable.
  6. · 12 years ago
    yeah but a double click includes a single click as i underatand it
  7. · 12 years ago
    Ok, I'll handle double-clicks myself then, thanks.
  8. · 12 years ago
    I find it hard to believe that we cannot have both a Single-Click and a Double-Click action setup?

    It's quite a lot of work to create scripts to:
    1) Store the object clicked
    2) Wait for another click of the same object (Wait for ?ms)
    3) Call Single-Click or Double-Click action depending on click count

    Surely this is something that should be handled by the VS engine?
  9. · 12 years ago
    you could try registering lua functions to the mouse event but i dont know how to dynamically bind them to your Objects
  10. · 12 years ago
    If you really need to do that, you can define your own left click action, but you need to make "command executed" out of your actions. One for left click, one for double click. The left click action would be like

    save object
    wait 500ms or so
    if condition doubleclicked
    set condition doubleclicked to false
    set command doubleclick
    else
    set command singleclick
    endif
    execute command on saved object
    clear saved object

    And the double click action is just

    set condition doubleclicked to true

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?