Results 1 to 7 of 7

Thread: onDoubleClick help

Hybrid View

  1. #1

    onDoubleClick help

    Does anyone know how to use onDoubleClick for the map? I am having trouble getting this event working. Thanks in advance!

  2. #2
    Similar command, Same syntax, but better documented: http://community.bistudio.com/wiki/onMapSingleClick

    Without know what you want to do, it's hard to provide help.

  3. #3
    It's not the same syntax.

    onDoubleClick is:

    map onDoubleClick command

    what do I put in for 'map' if I want it to respond to double-clicking on the in-game map?

  4. #4
    My mistake.
    I think the onDoubleClick is something used in the editor, not in-game.

    What if you embedded the command inside itself?

    onMapSingleClick "[] spawn {execVM 'reset.sqf';}; onMapSingleClick 'command; true;'; true;"

    reset.sqf
    Code:
    sleep 0.5;
    onMapSingleClick "";
    Force player to click twice in less than half a second for it to be considered a double-click.
    Last edited by tcp; Oct 23 2009 at 21:08.

  5. #5
    Quote Originally Posted by tcp View Post
    My mistake.
    I think the onDoubleClick is something used in the editor, not in-game.

    What if you embedded the command inside itself?

    onMapSingleClick "[] spawn {execVM 'reset.sqf';}; onMapSingleClick 'command; true;'; true;"

    reset.sqf
    Code:
    sleep 0.5;
    onMapSingleClick "";
    Force player to click twice in less than half a second for it to be considered a double-click.
    You know that this is not what he needs. As you know about his other thread, he's looking for a way to get the position of markers created on map by a double click.

  6. #6
    ProfTournsol, what is your solution?

    My solution or even a single click action might work if you execute a script that waits a certain amount of time then finds the nearest marker to the clicked position.

  7. #7
    Quote Originally Posted by tcp View Post
    ProfTournsol, what is your solution?

    My solution or even a single click action might work if you execute a script that waits a certain amount of time then finds the nearest marker to the clicked position.
    Sorry, i didn't understood that you meant it that way. But i'm not aware of a way to get "the nearest marker" from a given clicked position.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •