Difference between revisions of "onMapSingleClick"

From Bohemia Interactive Community
Jump to navigation Jump to search
(supports _this, example, description)
(examples formatting)
Line 40: Line 40:
 
| [[Nothing]] |= Return value
 
| [[Nothing]] |= Return value
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
| x1 = <code>'''onMapSingleClick "'''<nowiki>'</nowiki>SoldierWB' [[createUnit]] [_pos, [[group]] [[player]]]; true;'''"'''</code>
+
| x1 = <code>[[onMapSingleClick]] "'SoldierWB' [[createUnit]] [_pos, [[group]] [[player]]]; true";</code>
 
'''ArmA:''' Creates a soldier unit at the position clicked.|= Example 1  
 
'''ArmA:''' Creates a soldier unit at the position clicked.|= Example 1  
  
| x2 = <code>[[onMapSingleClick]] "_grp1 [[move]] _pos; [[onMapSingleClick]] <nowiki>''</nowiki>; [[true]]";</code>
+
| x2 = <code>[[onMapSingleClick]] "grp1 [[move]] _pos; [[onMapSingleClick]] ''; [[true]]";</code>
 
'''ArmA:''' Orders "_grp1" to move to position clicked. Disables further map-click actions.| = Example 2
 
'''ArmA:''' Orders "_grp1" to move to position clicked. Disables further map-click actions.| = Example 2
  
| x3 = <code>[[onMapSingleClick]]"""SoldierWB"" [[createUnit]] [_pos, [[group]] [[player]]]; [[true]]"</code>
+
| x3 = <code>[[onMapSingleClick]] "'SoldierWB' [[createUnit]] [_pos, [[group]] [[player]]]; [[true]]";</code>
 
'''OFP:''' In OFP single quotes cannot be used for string definition, so two double-quotes have to be used instead. |= Example 3  
 
'''OFP:''' In OFP single quotes cannot be used for string definition, so two double-quotes have to be used instead. |= Example 3  
  
Line 52: Line 52:
 
[[onMapSingleClick]] {_shift};</code>|= Example 4
 
[[onMapSingleClick]] {_shift};</code>|= Example 4
  
| x5 = <code>//pass params to onMapSingleClick code
+
| x5 = <code>//Pass params to onMapSingleClick code
 
[[player]] [[onMapSingleClick]] {[[hint]] ("Hello " + [[name]] _this)}; //Hello KK</code>|= Example 5
 
[[player]] [[onMapSingleClick]] {[[hint]] ("Hello " + [[name]] _this)}; //Hello KK</code>|= Example 5
  

Revision as of 01:08, 28 June 2014

Template:Command

Notes

Posted on 8 July, 2009
General Barron
See my Multiple OnMapSingleClick script to allow you to add multiple events to the onMapSingleClick event. Some minor editing of the scripts would be required to use them in Arma.

Notes