Jump to content
Sign in to follow this  
General Barron

Multiple 'OnMapClick' Command Handler RELEASED

Recommended Posts

If you have ever tried to use the 'onmapsingleclick' command, you'll realize how frustrating it can be for all but the simplest tasks. This script lets you easily 'add' and 'remove' as many commands to it as you want!

Click commands can also be set to 'remove' themselves automatically after a number of mapclicks, after a certain amount of time passes, or after a certain condition is met. In addition to the normal parameters passed to the 'OnMapSingleClick' command, you can 'attatch' additional data that will be sent to the code run by the click.

See the readme for more information. Also see the demo mission--you might be impressed at how easily new mapclick commands are added and removed!

Get it at OFPEC and let me know what you think:

http://ofpec.com/editors/resource_view.php?id=850

Share this post


Link to post
Share on other sites

Here we go ;-)

Nice tool !

Is it MP compatible ?

PS: The color of MP Voting console runs nice now yay.gif

Share this post


Link to post
Share on other sites

Very useful for certain mp league maps ... its been a pain in the ass in the past...

thanks a lot thumbs-up.gif

Share this post


Link to post
Share on other sites
Nice tool !

Is it MP compatible ?

Thanks for the comments! Glad to hear I wasn't the only one having trouble with this command wink_o.gif.

It should be MP compatible, as long as all functions are run only on the client that you want to adjust the mapclick for.

So, if you've got player A and player B, and you want to change player A's mapclick stuff, you just gotta be sure that you make all your function calls on player A's computer only.

Keep in mind that, as with the regular 'onmapclick' command, all code will only be executed on that specific client.

This is all untested, but I don't see any reason why it wouldn't work. I'm working on a minor update right now, so I'll try to get a quick LAN going and see the results. I'll also update the readme with MP info.

Share this post


Link to post
Share on other sites

Updated to v1.1

-Added a new parameter to GENB_mapclick_add function--code to be run if the click command is automatically removed.

-New parameter passed to click command code--# of clicks remaining.

-Updated readme with MP editing info

Share this post


Link to post
Share on other sites

Brilliant. smile_o.gif This should come in handy. Can't test at the moment, at work, but I'll give it a spin as soon as I can. Good work as always GB! smile_o.gif

Share this post


Link to post
Share on other sites

Thanks GB! Will try it out, may come in handy someday...

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Updated to v1.2

I'm happy to announce I've added support for 'on map double-click' commands. Unfortunately, you can't double-click too fast, or else the game won't detect the clicks (it will place a marker instead).

Also fixed a small bug, improved the layout/commenting of the code, and made the readme a little clearer.

Share this post


Link to post
Share on other sites

Hate to dig up an oldie but link is down

Does someone have working link for this?

Share this post


Link to post
Share on other sites

I know i shouldn't post aswell but this is something i could really do with aswell.

Share this post


Link to post
Share on other sites

Thanks GB, much appreciated smile_o.gif

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  

×