Jump to content
Sign in to follow this  
uiox

Problem with onmapsingleclick

Recommended Posts

In a saved mission onMapSingleClick doesn't worked...

Share this post


Link to post
Share on other sites

I confirm that. I think the onMapSingleClick actionstring simply isn´t saved. When manually reissuing the command after the save it works again.

Share this post


Link to post
Share on other sites

It's really a big problem for us...

Finally it's not a problem biggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gif

Share this post


Link to post
Share on other sites

What do you mean, "Finally it's not a problem?"  How were you able to fix/resolve this?

Real reason I am posting:  just wanted to let people know it seems onMapSingleClick can work at the briefing screen before the mission starts even!  I just thought that was interesting.  I accidentally clicked to fire artillery which is what the onMapSingleClick did in this mission, and it actually fired.  Well it didn't fire but, as soon as the mission begain the shells started falling at the spots I'd clicked at.

Doolittle

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">onMapSingleClick command

Operand types:

   command: String

Compatibility:

   Version 1.85 required.

Type of returned value:

   Nothing

Description:

   Define action performed when user clicks in map. Command receives:

   

   _pos array position

   _units array selected units

   _shift,_alt bool key state

   

   If click is processed, command should return true.

Example:

   onMapSingleClick {"SoldierWB" createUnit [_pos,group player];true}

<span id='postcolor'>

By the way, WHY must this command return true?  I just noticed this and I wasn't using it before to any ill effect.

I know, don't ask why, just do it.

Doolittle

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">What do you mean, "Finally it's not a problem?" How were you able to fix/resolve this?<span id='postcolor'>

Thats because Suma posted it will be fixed.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">By the way, WHY must this command return true?<span id='postcolor'>

If it returns true, the standard map interactions (ordering selected units to move/watch to position; movement order for vehicle driver) are completely blocked. You will then only get the custom action you define in the onMapSingleClick command.

If it returns false (or nothing) the player may get both the standard action + your custom action simultaneously.

Spinor

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  

×