Jump to content
Sign in to follow this  
soulaco

onDoubleClick help

Recommended Posts

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

sleep 0.5;
onMapSingleClick "";

Force player to click twice in less than half a second for it to be considered a double-click.

Edited by tcp

Share this post


Link to post
Share on other sites
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

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×